Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Useless GUI problem again

$
0
0
Ok guys so i was thinking how to make an inventory with unity gui. So i thought to make buttons with textures for items icons and work on them. But i cant do even this... I have a gameobject array [20] for all inventory items (null or not). So i use this: if(GUI.Button (Rect(arrayx, arrayy, 60, 60), Items[0].SendMessage("returner_txtr"))){ } where returner_txtr gives the texture variable of the gameobject. But it says that BCE0023: No appropriate version of 'UnityEngine.GUI.Button' for the argument list '(UnityEngine.Rect, void)' was found. which means that it thinks that this: Items[0].SendMessage("returner_txtr") returns void instead of a texture. I tested it and putted a cube with a texture but still. I also tried to use GetComponent but this doesnt work at all... help :D

Viewing all articles
Browse latest Browse all 215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>