I have a problem. I’ve declared the variable:
public Sprite[ ] CardPics;
and filled it in the Inspector:
… but when I try to access it:
print ("C? " + CardPics.Length);
I get a length of 0. What gives? Why isn’t the length 172?
I have a problem. I’ve declared the variable:
public Sprite[ ] CardPics;
and filled it in the Inspector:
… but when I try to access it:
print ("C? " + CardPics.Length);
I get a length of 0. What gives? Why isn’t the length 172?
Ok, I solved this one. You can have a script attached to a GameObject, and this will work fine (if you’re looking to have a function on a Prefab object, the GameObject needs to be a Prefab as well). If the script is on the Main Camera, it won’t work. Go figure.