Exemplo n.º 1
0
 //-----------------------------------------------------------------------------------
 public void Clear()
 {
     goToIdCaronte_.Clear();
     listDeferredIdsToDelete_.Clear();
     listObjectsIds_.Clear();
     GOManager.unregisterAllGameObjects();
 }
Exemplo n.º 2
0
        //-----------------------------------------------------------------------------------
        private void DeleteDeferredGameObjects()
        {
            foreach (uint id in listDeferredIdsToDelete_)
            {
                goToIdCaronte_.TryRemoveBySecond(id);
                GOManager.unregisterGameObject(id);
            }

            listDeferredIdsToDelete_.Clear();
        }
Exemplo n.º 3
0
        //-----------------------------------------------------------------------------------
        private void RegisterUnityGameObjectsInCaronte()
        {
            GameObject[] sceneObjects = CarEditorUtils.GetAllGameObjectsInScene();
            int          length       = sceneObjects.Length;

            for (int i = 0; i < length; ++i)
            {
                GameObject go = sceneObjects[i];
                CarEditorUtils.GetChildObjectsIds(go, listObjectsIds_);
                uint idCaronte;
                bool exists = goToIdCaronte_.TryGetByFirst(go, out idCaronte);
                if (!exists)
                {
                    idCaronte = GOManager.RegisterGameObject(go.name, go.GetInstanceID(), listObjectsIds_.ToArray());
                    goToIdCaronte_.Add(go, idCaronte);
                }
                else
                {
                    GOManager.ReregisterGameObject(idCaronte, go.name, go.GetInstanceID(), listObjectsIds_.ToArray());
                }
            }
        }