Hello,
I'm still getting used to the Unity Scripting language. However, I'm learning pretty fast now. I started writing a script for an inventory in my game. It's working quite well. But as it is right now, the buttons for each item have their own position inside the inventory. I need to get it so the buttons position is some type of "float: left". Is this possible? I have them in a GUI Group (the inventory space) so it would work if they float to the top-left of this group.
Here's the current code for one of the item buttons:
if (logs > 0){
if (GUI.Button (Rect (75,0,75,75), logs + " Logs")) {
var otherMakingFire : MakingFire = gameObject.GetComponent(MakingFire);
otherMakingFire.MakeCampFire ();
}
}
What I need to get is changing
Rect (75,0,75,75)
to something similar to
Rect (top,left,75,75)
Thanks for any help!
(If you want to see the game so you know what I'm talking about, the newest version is always available at http://www.mythstrott.webs.com/mythstrott.html)