Quantcast
Channel: Questions in topic: "selectiongrid"
Viewing all articles
Browse latest Browse all 94

SelectionGrid is not returning a value!!

$
0
0
I've written an Inventory system and have come to a point where I want a small submenu to popup in the form of a selection grid, except that the selection grid isn't returning any value, it stays the same value it was initialized to... So stupid.. however, whenever I right click it does return a value, but not on left click... Here's my code where I use selection grid, I declare my menuChoice int as a global variable. if(menuActive == 2) { menuPos = new Vector2(mouse.x + 13, mouse.y); menuActive = 1; } Debug.Log("Before Selection : " + menuChoice); menuChoice = GUI.SelectionGrid(new Rect(menuPos.x, menuPos.y, 100, 100), menuChoice, menuItems,1); Debug.Log(" Selection : " + menuChoice);

Viewing all articles
Browse latest Browse all 94

Trending Articles



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