A class in Root.Township, the global namespace.
Debug tool: force-loads the chunks around each listed position in turn, timing the load and unload and logging FPS and entity counts.
Constructors
| Member | What it is |
|---|
ProfileChunkLoading() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|
private Coroutine currentProfile | The running coroutine. |
private bool isStarting | Inspector button that starts the run. |
private int iterations | How many times to go through the positions (default 10). |
private static Logger logger | The ChunkLoading NLog logger. |
private List<ProfileChunkLoading.ProfilingPosition> positions | Backing field for Positions. |
private ProfileChunkLoading.ProfileData profilingData | Results for the current position. |
private HashSet<Chunk> waitingFor | Chunks not yet loaded or unloaded. |
Properties
Methods
| Member | What it is |
|---|
IEnumerator Profile() (iterator) | Coroutine that runs every position for each iteration, with server diagnostics off, and logs the results to the ChunkLoading logger. |
void StartProfiling() | Starts the run if one isn't already going. |
3 private and internal methods
| Member | What it is |
|---|
private void MarkAsLoaded(Chunk loadedChunk) | Removes a chunk from the wait list once fully loaded. |
private void MarkAsUnloaded(Chunk loadedChunk) | Removes a chunk from the wait list once fully unloaded. |
private void OnDrawGizmos() | Draws a sphere at each position. |