Ignition / ObjectCounter
Inherits from MonoBehaviour
Class or component can be found in Assets/Playniax/Ignition/Framework/Scripts (MonoBehaviour)/ObjectCounter.cs
The ObjectCounter keeps track of the number of GameObjects enabled in the scene.
In order for this to work you will need to add the ObjectCounter component to the GameObject that need to be included in the count.
Example scene can be found in Assets/Playniax/Ignition/Examples/01 - Framework/ObjectCounter.unity
Example script can be found in Assets/Playniax/Ignition/Examples/01 - Framework/Scripts (MonoBehaviour)/ObjectCounter_Example.cs
public class ObjectCounter_Example : MonoBehaviour
public Text text;
if (text == null) text = GetComponent<>Text>();
// Get and display the number of objects.
text.text = ObjectCounter.count.ToString();