None of my other Objects seem to be able to reference the script ItemManager, every time I call for a static variable from it, it returns null.
World -
[24535-ss+(2014-03-30+at+06.09.45).png|24535]
Player -
[24536-ss+(2014-03-30+at+06.11.40).png|24536]
Here is the first (of many) places I get the error:
NullReferenceException: Object reference not set to an instance of an object
Inventory.Start () (at Assets/Scripts/Player/Inventory.cs:58
Line58: ItemSlot temp = new ItemSlot(ItemManager.EMPTY.ShallowCopy());
I think it has to do with the static variable EMPTY, however I believe I have it setup correctly:
public static Item EMPTY;
public static Item STONE;
public static Item GRASS;
public static Item BRICK;
//************************************
// Use this for initialization
void Start () {
Debug.Log ("Initalized");
guiCon = gameObject.GetComponent ("GUIController") as GUIController;
soundMan = gameObject.GetComponent ("SoundManager") as SoundManager;
// *** Set new ***
// *** Initialize Item ***
EMPTY = new Item("", 0 , 64, new Rect(0.25f,0.75f, 0.25f,0.25f), itemIcons, Item.ItemType.Empty,"DefaultItem");
// MORE CODE AFTER...