Example #1
0
        /// <summary>
        /// Define instance and check for duplicated pools.
        /// </summary>
        private void Awake()
        {
            instance = this;

            Object[] otherPool = FindObjectsOfType(this.GetType());
            if (otherPool.Length > 1)
            {
                Debug.LogError(
                    "<color=magenta>[MultiPool]</color> MultiPool can only exist once in the scene!"
                    );
#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPaused = true;
#endif
            }
        }
Example #2
0
 /// <summary>
 /// Set the script reference.
 /// </summary>
 private void OnEnable()
 {
     _multipool = (MultipoolManager)target;
 }