예제 #1
0
            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);
            }
예제 #2
0
            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);
            }
예제 #3
0
            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);
            }