So I’m trying to make a prefab for animated text and I want to Instantiate it by clicking a button. When I set the button up and run the game Unity says I’m missing a reference to the text object on the prefab. Why doesn’t the text object stay on the animated text prefab? In fact once I turn the animated text object a prefab it losses it’s reference to the text object, why?
Prefabs can’t store references to instantiated objects in the scene hierarchy. What you should do is populate references to scene objects in the Start() method.
it worked for me when i used ‘[SerializeField]’ instead of ‘public’