How do I assign a GUI.Button to a Game Object?
Hey, I grabbed the NetworkManagerHUD.cs from Unity's BitBucket and I decided to use it and change so it would fit my needs. The script uses default unity buttons (GUI.Button) to load functions, and I find it hard to customize them. For instance:
if (GUI.Button(new Rect(xpos, ypos, 200, 20), "LAN Host(H)"))
{
manager.StartHost();
}
How do I make a button that I could use and assign to my "Hierarchy" instead of this default button? I would like to position the buttons in the editor, instead of having the default ones, which aren't responsive if you move them around.
Been struggling with this for too long, any idea how I can solve this?
This is the old unity UI (before version 4.6). I advise updating to the new one (look at some of the old live stream tutorials or Brackey's series on the new UI system)
Your answer
Follow this Question
Related Questions
Why is my GUI popup showing up for both host and client? 0 Answers
Multiplayer Hiding Layer just for Local Player 0 Answers
UNET Scene Object RPC 1 Answer
spawning a gun in a multiplayer game 1 Answer
Multiplayer Random Generated Maze 0 Answers