Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

[SOLVED]I can't use Select() on my Buttons in scripts

$
0
0
Hi
i'm working on a menu using xbox controller

I want to select a <Button> object in a script, but get an error i can't solve

First i made a public list of buttons that i dragged and dropped in the inspector

Code (CSharp):
  1. public List<Button> ButtonTab;
  2. private int idNav;
Then later when i tryed to do this :
Code (CSharp):
  1. ButtonTab [idNav].Select ();
i got the error :

NullReferenceException: Object reference not set to an instance of an object...

[SOLVED]I can't use Select() on my Buttons in scripts

Viewing all articles
Browse latest Browse all 23263

Trending Articles



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