mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 12:03:04 +00:00
add some logs
This commit is contained in:
parent
a60d9d1b51
commit
baedb28277
1 changed files with 9 additions and 1 deletions
|
@ -186,6 +186,8 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
m_insts = new Dictionary<Instance, StaticGeometry> (48 * 1024);
|
||||
|
||||
int numObjectsReused = 0;
|
||||
var stopwatchCreation = System.Diagnostics.Stopwatch.StartNew();
|
||||
double totalCreationTime = 0;
|
||||
|
||||
foreach (var plcm in placements)
|
||||
{
|
||||
|
@ -215,7 +217,9 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
}
|
||||
else
|
||||
{
|
||||
stopwatchCreation.Restart();
|
||||
m_insts.Add(plcm, StaticGeometry.Create());
|
||||
totalCreationTime += stopwatchCreation.Elapsed.TotalSeconds;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +240,7 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
}
|
||||
}
|
||||
|
||||
Debug.Log($"Num static geometries {m_insts.Count}, existing {numExistingObjects}, reused {numObjectsReused}, deleted {numDeletedObjects}");
|
||||
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
|
||||
_worldSystem = new WorldSystemWithDistanceLevels<MapObject>(
|
||||
this.drawDistancesPerLayers,
|
||||
|
@ -245,6 +249,10 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
this.OnAreaChangedVisibility);
|
||||
|
||||
this.FocusPointManager = new FocusPointManager<MapObject>(_worldSystem, this.MaxDrawDistance);
|
||||
|
||||
double worldSystemInitTime = stopwatch.Elapsed.TotalSeconds;
|
||||
|
||||
Debug.Log($"Num static geometries {m_insts.Count}, existing {numExistingObjects}, reused {numObjectsReused}, deleted {numDeletedObjects}, creation time {totalCreationTime:F3} s, world system init time {worldSystemInitTime:F3} s");
|
||||
}
|
||||
|
||||
public void InitStaticGeometry ()
|
||||
|
|
Loading…
Reference in a new issue