Ok, I think I'm getting close, but still missing something...
I'm now no longer getting any errors, but the cursor still doesn't change.
Here's my code now:
public class UI_Player_Inventory_Slot : MonoBehaviour {
public int slot;
UIAtlas mAtlas;
// Use this for initialization
void Start () {
}
void Awake ()
{
mAtlas = GetComponent<UIAtlas> ();
}
// Update is called once per frame
void Update () {
}
void OnClick ()
{
Debug.Log ("inventory slot clicked");
Game_Manager.Player_Inventory_Slots [slot].item_id = 1;
if (Game_Manager.Player_Inventory_Slots [slot].item_id > 0)
{
//pickup item
Game_Manager.held_item = Game_Manager.Player_Inventory_Slots [slot].item_id;
Game_Manager.Player_Inventory_Slots [slot].item_id = 0;
UICursor.Set(mAtlas,"Book_00");
}
}
}
Any ideas on what I'm missing?