Skip to main content

ProfilingPositionCycler

A class in Root.Township, the global namespace.

Client debug settings: moves the camera to saved positions, waits for chunks to load, records Unity profiler data and render stats, and writes a report.

Constructors​

MemberWhat it is
ProfilingPositionCycler()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

MemberWhat it is
List<ProfilingPositionCycler.ProfilingPosition> positionsCamera positions and rotations to profile.
1 private and internal field
MemberWhat it is
private float timePerPositionSeconds to record at each position (up to 150 frames).

Properties​

MemberWhat it is
static string ProfilingPath { get; }ProfilingResults folder under persistent storage.

Methods​

MemberWhat it is
IEnumerator SingleProfile() (iterator)Profiles the current camera position only.
IEnumerator StartForwardRendereringProfiler(Transform cameraTransform, Transform vrCameraTransform, int iterations) (iterator)For each position, records a baseline and then again with each RenderingDisabler type off, for several iterations.
IEnumerator StartProfiling(Transform cameraTransform, Transform vrCameraTransform) (iterator)For each position, loads the chunk, waits, records a profiler log for up to 150 frames and adds FPS and render stats to the report.
2 private and internal methods
MemberWhat it is
private IEnumerator RecordPositionAndState(string folderPath, int current, int frames, Transform cameraTransform, Transform vrCameraTransform, StringBuilder result) (iterator)Writes visible renderer, skinned mesh, vertex and unique mesh counts. Its FPS and render time lines are always empty.
private void WriteResults(string profilerName, string folderPath, StringBuilder result)Writes the report to a _Loader.txt file.