Reputation: 13
I have a custom UI element in the Mainmenu scene that works fine, but when i make a prefab out of it, all the text and images become invisible, and the rect transform goes blank
the instatiated invisible prefab
Upvotes: 1
Views: 1431
Reputation: 58
You should instantiate it as a child object of Canvas.
Instantiate(prefab, thatCanvas.transform);
Upvotes: 1