Created
December 9, 2015 18:30
-
-
Save akbiggs/963ca5fae34479c204f3 to your computer and use it in GitHub Desktop.
GameObject Find Public Inspector Fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public class ShowNumberOfCanvasChildren : MonoBehaviour | |
{ | |
public GameObject Canvas; | |
public Text NumChildrenText; | |
private void Update() | |
{ | |
NumChildrenText.text = "Canvas child count: " + Canvas.transform.childCount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment