// Use this for initialization void Start() { inventory = InventarySystem.instance; // inventory.onItemChangeCallback += UpdateUI; slots = itemsParent.GetComponentsInChildren <InventorySlot>(); }
private void Awake() { if (instance != null) { Debug.LogError("More than one instance of inventory is trying to active"); return; } instance = this; }
private void Awake() { DontDestroyOnLoad(gameObject); if (instance != null) { Debug.LogWarning("More than one instance of inventory is trying to active"); return; } instance = this; }