- Home /
Cannot drag text object into inspector
Cannot drag text object into inspector I was just making code in a prefab using ui text but when i tried to drag it to inspector it does not work it is showng me black circle like something is wrong.
untitledhf.png
(358.0 kB)
untitled43t.png
(89.9 kB)
Comment
Answer by GilbertoBitt · Sep 16, 2016 at 11:33 AM
its occur becouse its a prefab the way to do it it`s dinamic find it on runtime when the prefab its on the hierachy... using
GameObject.Find("Hand");
or
GameObject.FindGameObjectsWithTag("Respawn");
or
respawn = GameObject.FindWithTag("Respawn");
only if u have your prefab on the hierachy (the instance of it) u will able to drag it to it.
Answer by Firedan1176 · Sep 15, 2016 at 04:41 PM
Either scoreText
isn't a UnityEngine.UI.Text component, or the 'Text' object doesn't have that component on it.