public static GameObject GetObject(Scene scene, int sceneObjectID) { GameObject obj = null; if (sceneObjectID != -1) { SceneIndexer indexer = SceneUtils.FindInScene <SceneIndexer>(scene); if (indexer != null) { obj = indexer.GetObject(sceneObjectID); } } return(obj); }
private GameObject GetSceneObject(Scene scene) { GameObject gameObject = null; if (scene.IsValid() && scene.isLoaded) { GameObject obj = SceneIndexer.GetObject(scene, _sceneObjectID); if (obj != null) { gameObject = obj; _objectName = obj.name; } } return(gameObject); }
private GameObjectLoader GetGameObjectLoader(Scene scene) { GameObjectLoader loader = null; if (_sourceType == eSourceType.Loaded) { if (scene.IsValid() && scene.isLoaded) { GameObject obj = SceneIndexer.GetObject(scene, _sceneObjectID); if (obj != null) { loader = obj.GetComponent <GameObjectLoader>(); } } } return(loader); }