//----------------------------------------------------------------------------------- public void Clear() { goToIdCaronte_.Clear(); listDeferredIdsToDelete_.Clear(); listObjectsIds_.Clear(); GOManager.unregisterAllGameObjects(); }
//----------------------------------------------------------------------------------- private void DeleteDeferredGameObjects() { foreach (uint id in listDeferredIdsToDelete_) { goToIdCaronte_.TryRemoveBySecond(id); GOManager.unregisterGameObject(id); } listDeferredIdsToDelete_.Clear(); }
//----------------------------------------------------------------------------------- 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()); } } }