// Update is called once per frame void Update() { #if (UNITY_EDITOR) Text t = gameObject.GetComponentInChildren <Text>(); LetterSpawn ls = gameObject.GetComponent <LetterSpawn> (); if (t != null && ls != null) { t.text = ls.id.ToString(); } #endif }
void Awake() { letters = GetComponent <LetterSpawn>(); bullets = GetComponent <BulletSpawner>(); health = GetComponent <EnemyHealth>(); }