display some stats

This commit is contained in:
in0finite 2021-06-26 01:58:05 +02:00
parent c7a4fc9332
commit bac100ebcb
2 changed files with 3 additions and 0 deletions

View file

@ -334,6 +334,8 @@ namespace SanAndreasUnity.Behaviours.World
GUILayout.Label("total num divisions " + (null == _leaves ? 0 : _leaves.Count));
GUILayout.Label("total num objects " + totalNumObjects);
GUILayout.Label("geometry parts loaded " + SanAndreasUnity.Importing.Conversion.Geometry.NumGeometryPartsLoaded);
GUILayout.Label("num TOBJ objects " + StaticGeometry.TimedObjects.Count);
GUILayout.Label("num active objects with lights " + StaticGeometry.ActiveObjectsWithLights.Count);
GUILayout.Label("num objects in current division " + (containingDivision != null ? containingDivision.NumObjects : 0));
GUILayout.Label("num divisions updated " + numDivisionsUpdatedLoadOrder);
GUILayout.Label("num objects updated " + numMapObjectsUpdatedLoadOrder);

View file

@ -66,6 +66,7 @@ namespace SanAndreasUnity.Behaviours.World
// hashset is better because we do lookup/remove often, while iteration is done rarely
private static HashSet<StaticGeometry> s_activeObjectsWithLights = new HashSet<StaticGeometry>();
public static IReadOnlyCollection<StaticGeometry> ActiveObjectsWithLights => s_activeObjectsWithLights;
// use arrays to save memory
// set them to null to save memory