Everytime I want to play my Game with this script attached:
//...
public Sprite[][] ObjectTypestobuy;
public Sprite[] Characters;
public Sprite[] Helmets;
public Sprite[] Weapons;
public Sprite[] Mantles;
public Sprite[] Shields;
void Start()
{
ObjectTypestobuy[0] = Characters; //This is the line where the error message points to
ObjectTypestobuy[1] = Helmets;
ObjectTypestobuy[2] = Weapons;
ObjectTypestobuy[3] = Mantles;
ObjectTypestobuy[4] = Shields;
}
...it throws the following error: NullReferenceException:
> Object reference not set to an instance of an object (wrapper
> stelemref) object:stelemref (object,intptr,object) Shop_Handler.Start
> () (at Assets/Shop_Handler.cs:88)
The line which is marked as error is this one:
ObjectTypestobuy[0] = Characters;
I think the problem is, because it says I should edit public Sprite[][] ObjectTypestobuy;
in the Inspector. But I can't find it in the inspector.
Any help would be precated.