public bool HasLevelObject(GameLevelObject o)
 {
     if (levelObjects != null)
     {
         for (int i = 0; i < levelObjects.Length; i++)
         {
             if (levelObjects[i] == o)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
        public void RegisterLevelObject(GameLevelObject o)
        {
            if (Application.isPlaying)
            {
                Debug.LogError("Do not invoke in play mode!");
                return;
            }

            if (HasLevelObject(o))
            {
                return;
            }

            if (levelObjects == null)
            {
                levelObjects = new GameLevelObject[] { o };
            }
            else
            {
                System.Array.Resize(ref levelObjects, levelObjects.Length + 1);
                levelObjects[levelObjects.Length - 1] = o;
            }
        }