Skip to main content

ComponentCounter

A class in Root.Township, the global namespace.

Editor tool that lists every component of a chosen type under this object.

Constructors​

MemberWhat it is
ComponentCounter()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Component componentTypeAny component of the type to count.
private Component[] foundThe components found.
private bool isIncludingDisabledWhether inactive children are included.

Methods​

1 private and internal method
MemberWhat it is
private void OnValidate()Fills found with all child components of componentType's type.