1

I have a GUILayout.Area and I want to add some GUILayout.Button into it dynamically(through a script). I also have a side menu button which when the user clicks it, a menu will be shown on top of all objects. I know about sorting layer and second camera but they didn't work and when pressing the side menu button, the GUILayout.Button is showing over the menu. Any help is greatly appreciated

Aimee Borda
  • 842
  • 2
  • 11
  • 22
R.T
  • 23
  • 1
  • 4
  • Use Unity's [new UI](https://unity3d.com/learn/tutorials/topics/user-interface-ui) for that not this. – Programmer May 15 '17 at 05:15
  • according to what i saied i can't access to unity editor and should write all thing i need via code,so i can't understand how to do this with UI buttons, i'm very new in unity – R.T May 15 '17 at 07:48
  • You want to create UI Buttons from code? Are you new to C# too or just Unity? – Programmer May 15 '17 at 07:49
  • yes, want to create multiple button from code. i am new to both of them :D – R.T May 15 '17 at 08:14
  • See Unity's C# [tutorial](https://unity3d.com/learn/tutorials/s/scripting). You need that. For creating many UI Controls from script see [here](http://stackoverflow.com/questions/41194515/unity-create-ui-control-from-script/41219377#41219377). – Programmer May 15 '17 at 08:21

0 Answers0