Skip to main content

SpawningTimer.ResultTimes

A private struct in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Totals in milliseconds from one SpawningTimer benchmark run of a network prefab. Editor/debug tool only.

Fields​

MemberWhat it is
double destroyDurationTotal time to destroy the entities spawned in the run.
double instantiateTimeTotal time for plain Object.Instantiate of the prefab, without the network spawner.
double setOwnedTimeTotal time to call InitializeAsServer on the instantiated copies.
double setScaleTimeTotal time to set a random local scale on each instantiated copy.
double spawnDurationTotal time to spawn the prefab through the network spawner's SpawnInternal.
double spawnExistingTimeTotal time to register the instantiated copies with SpawnExisting.

Methods​

MemberWhat it is
string GetAverageTimes(int numberOfTimesToSpawn)Returns the per-spawn averages as one CSV row (spawn, instantiate, spawn existing, set owned, destroy, set scale).

Used in​

Members of other types that take, return or hold a ResultTimes: