/// <summary> /// Called when the object is selected in the editor /// </summary> private void OnEnable() { // Grab the serialized objects mTarget = (SpellInventory)target; mTargetSO = new SerializedObject(target); // Create the list of items to display InstantiateItemList(); }
/// <summary> /// Releases the spell back to the pool if we have a prefab /// </summary> public void Release() { if (ShowDebug) { Utilities.Debug.Log.FileWrite("Spell[" + Name + "].Release()"); } mOwner = null; mSpellInventory = null; Reset(); if (mPrefab != null) { ScriptableObjectPool.Release(mPrefab, this); mPrefab = null; } }