Last active
April 27, 2016 18:11
-
-
Save akbiggs/7b1fdd4022c1a0ce7876 to your computer and use it in GitHub Desktop.
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 | |
{ | |
[SerializeField] private GameObject _canvas; | |
[SerializeField] private 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