Inheritance: MonoBehaviour
		public static void Show(UIItemSlot slot)
		{
			if (m_Instance == null)
				return;
			
			// Assign the item slot
			m_Instance.AssignSlot(slot);
			
			// Show the window
			m_Instance.Show();
		}
    void OnEnable()
	{
		if (this.slot == null)
			this.slot = this.GetComponent<UIItemSlot>();
        
        if (PlayFabDataStore.playerInventory.Count >= assignItem && !isAssigned)
        {
            isAssigned = true;
            itemDatabase.items.Add(PlayFabDataStore.catalogItems[PlayFabDataStore.playerInventory[assignItem - 1]]);
            SetItemToSlot();
        }

    }
		public void OnWindowTransitionComplete(UIWindow window, UIWindow.VisualState state)
		{
			if (state == UIWindow.VisualState.Hidden)
			{
				if (this.m_Slot != null)
					this.m_Slot.Unassign();
				
				if (this.m_NameText != null)
					this.m_NameText.text = "";
				
				if (this.m_DescriptionText != null)
					this.m_DescriptionText.text = "";
				
				this.m_SelectedSlot = null;
			}
		}
		/// <summary>
		/// Assigns the slot to the box.
		/// </summary>
		/// <param name="slot">Slot.</param>
		private void AssignSlot(UIItemSlot slot)
		{
			if (!slot.IsAssigned() || slot.GetItemInfo() == null)
				return;
				
			if (this.m_Slot != null)
				this.m_Slot.Assign(slot.GetItemInfo());
            

            if (this.m_NameText != null)
				this.m_NameText.text = slot.GetItemInfo().displayName;
			
			/*if (this.m_DescriptionText != null)
				this.m_DescriptionText.text = slot.GetItemInfo().Subtype + " " + slot.GetItemInfo().Type;*/
			
			// Save a ref to the slot
			this.m_SelectedSlot = slot;
            
        }
 void Awake()
 {
     if (this.slot == null)
         this.slot = this.GetComponent<UIItemSlot>();
 }