Hello everyone,
Basically, I have a scrollview of windows, and I’d like to have a main button in front of it.
But I’m unable to achieve this. I tried with GUI.BringWindowToBack, GUI.depth and even try to create the button from another script but nothing seems to work.
Does anyone ever achieve to do this?
Thanks in advance
Yes I am able to do it, much like you did, with GUI.bringWindowToBack and GUI.Depth. One of the things I am probably doing different though is that my button is in a seperate script from my window. Try setting the window to a lower GUI.Depth and sending it to the back in a seperate script.
using UnityEngine;
using System.Collections;
public class Menu : MonoBehavior
{
void OnGUI()
{
GUI.Box();
// Make a GUI Box,
// No values for time saving
GUI.Box();
// Let's make another one
GUI.Button();
// NOW create the button
}
}
create the button after everything else