Esempio n. 1
0
        public void RemoveNullPrefabEntries()
        {
            _prefabs.RemoveWithPredicate(item => item == null);
            List <Prefab> prefabsWithNullUnityPrefabs = _prefabs.GetEntitiesByPredicate(item => item.UnityPrefab == null);

            if (prefabsWithNullUnityPrefabs.Count != 0)
            {
                foreach (Prefab prefab in prefabsWithNullUnityPrefabs)
                {
                    _prefabs.RemoveEntity(prefab);
                    PrefabWasRemovedFromCategoryMessage.SendToInterestedListeners(this, prefab);

                    Octave3DWorldBuilder.DestroyImmediate(prefab);
                }

                EnsureActivePrefabIndexIsNotOutOfRange();
                EnsureActivePrefabPassesPrefabFilter();
            }
        }