Hello, I’m trying to fake an OS inside of unity for a hacker simulation game. And I’m just trying to get windows to be drug around and resized. Not a fan of the GUI.Window, I gave it a try and it would not cooperate well with me. I found it much easier and achievable to modify the look and feel of my windows if I used groups and texture elements.
But I’m trying to get the object to move, and I thought that this would work:
if (GUI.RepeatButton(new Rect(0, 0, xPositionButton, yPositionButton), "This is the move box"))
{
moveWindow = true;
}
while (moveWindow)
{
//Do Movement Code Here
Debug.Log("Works");
if(Input.GetButtonUp("Fire1"))
moveWindow = false;
}
And everytime I run the game to see if it works, Unity locks up. I’m imagining that I’m causing some type of memory error to occur. And I’m very open to different ways to accomplish what I’m trying to do, or if someone can tell me what the error is so that I can fix it. Thank you very much.