So I have a prefab of a regular Text element. Basically I just created a Text from the menu and saved it as a prefab. Then I created a Panel from the GameObject/UI/Panel menu and put it under my Canvas. I added a script on that panel that instantiates the Text prefab, parents it to the Panel using ".SetParent(Transform, bool)’ and sets the text value to something. The Text is not rendered in my scene. If I go to the inspector and disable the Text component and re-enable it, the text appears correctly.
Any idea what is causing this behavior ? I’m instantiating way more complicated UI elements prefabs at other places in my game and it works fine. I’m not sure what I’m doing wrong here.