Skip to content

SceneCounts

namespace Griff.Runtime;
public sealed class SceneCounts

How many entities a scene holds, how many of them are active (the game runs and draws them), and how many of each kind of component the active ones have, the most first (every entity’s Transform left out).

public int Active { get; init; }
public IReadOnlyList<ComponentCount> Components { get; init; }
public int Entities { get; init; }
public void Deconstruct(out int Entities, out int Active, out IReadOnlyList<ComponentCount> Components)
public override bool Equals(object? obj)
public bool Equals(SceneCounts? other)
public override int GetHashCode()
public static SceneCounts Of(Scene scene)

Counts scene as it is now, in one pass over every entity: a game’s frame can’t spare that for a big scene, so a profiler counts a slice at a time with a SceneCounter.

public override string ToString()
public static readonly SceneCounts None