private void GetCurrentCellGameObjects()
        {
            ResetCurrentCellInfo();

            var currentCellInfo = cellInfos.Find(c => c.cellId == CurrentCellID);

            if (currentCellInfo != null)
            {
                var allGameObjects     = SceneEditorDati.GetActualInstance().CurrentSceneInfo.items;
                var allGameObjectsList = allGameObjects.ToList();
                foreach (var gameObjectId in currentCellInfo.itemsNum)
                {
                    var gameObjectInfo = allGameObjectsList.Find(g => g.objNum == gameObjectId);
                    if (gameObjectInfo != null)
                    {
                        CurrentCellItems.Add(gameObjectInfo.obj);
                    }
                }
                foreach (var gameObjectId in currentCellInfo.OnlyInThisCellItemIds)
                {
                    var gameObjectInfo = allGameObjectsList.Find(g => g.objNum == gameObjectId);
                    if (gameObjectInfo != null)
                    {
                        OnlyInCurrentCellItems.Add(gameObjectInfo.obj);
                    }
                }
            }
        }
Пример #2
0
 private void SelectCellItemsInScene()
 {
     SceneEditorDati.GetActualInstance().SetSceneGameObjectInCell(cellId);
 }