Pathfinding.AstarProfiler.Reset C# (CSharp) Method

Reset() private method

private Reset ( ) : void
return void
		public static void Reset()
		{
			profiles.Clear();
			startTime = DateTime.UtcNow;
			
			if (fastProfiles != null) {
				for (int i=0;i<fastProfiles.Length;i++) {
					fastProfiles[i] = new ProfilePoint ();
				}
			}
		}
		

Usage Example

Ejemplo n.º 1
0
        void IUpdatableGraph.UpdateAreaInit(GraphUpdateObject o)
        {
            if (!o.updatePhysics)
            {
                return;
            }

            AstarProfiler.Reset();
            AstarProfiler.StartProfile("UpdateAreaInit");
            AstarProfiler.StartProfile("CollectMeshes");

            RelevantGraphSurface.UpdateAllPositions();

            // Calculate world bounds of all affected tiles
            IntRect touchingTiles = GetTouchingTiles(o.bounds);
            Bounds  tileBounds    = GetTileBounds(touchingTiles);

            // Expand TileBorderSizeInWorldUnits voxels in all directions
            tileBounds.Expand(new Vector3(1, 0, 1) * TileBorderSizeInWorldUnits * 2);

            var meshes = CollectMeshes(tileBounds);

            if (globalVox == null)
            {
                // Create the voxelizer and set all settings
                globalVox = new Voxelize(CellHeight, cellSize, walkableClimb, walkableHeight, maxSlope, maxEdgeLength);
            }

            globalVox.inputMeshes = meshes;

            AstarProfiler.EndProfile("CollectMeshes");
            AstarProfiler.EndProfile("UpdateAreaInit");
        }
All Usage Examples Of Pathfinding.AstarProfiler::Reset