- Home /
Canvas with GUI elements in prefab act strangely
I am trying to make a prefab in Unity 5.
I have a canvas with GUI elements such as scrolls, buttons, panels etc. I drag "Canvas" from hierarchy down to folder and prefab is created.
When I try to use this "Canvas" prefab in another scene/project, strange things happen:
1) I can see all the GUI elements, but nothing works: buttons not active, scroll doesn't scroll and so on
2) When I create a new canvas element and drag the contents of the prefabed canvas into the new one, all the UI elements/scripts start to work.
3) Whats even more strange, is once I did Step 2 and then deleted all the canvas in new protect and used the same "Canvas" prefab again there it started to work right away without the need to replace prefabed canvas with fresh ones.
4) Needless to say, if I am just creating the prefab with canvas content without canvas itself, and then just put it inside new canvas in a scene, it start working right away.
So my questions are:
Is this work as intended or am I doing something wrong?
How do I make an entire canvas with its contents a prefab that will have all GUI elements working right off the bat?
Thanks in advance!