Beispiel #1
0
            public GameObject GetGameObject()
            {
                if (_gameObject == null)
                {
                    switch (_sourceType)
                    {
                    case eSourceType.Scene:
                        _gameObject = GetSceneObject(_scene.GetScene());
                        break;

                    case eSourceType.Prefab:
                        _gameObject = GetPrefabObject();
                        break;

                    case eSourceType.Loaded:
                        _gameObject = GetLoadedObject(_scene.GetScene());
                        break;
                    }
                }

                return(_gameObject);
            }
Beispiel #2
0
            public GameObject GetGameObject()
            {
                switch (_sourceType)
                {
                case eSourceType.Scene:
                    return(GetSceneObject(_scene.GetScene()));

                case eSourceType.Prefab:
                    return(GetPrefabObject());

                case eSourceType.Loaded:
                    return(GetLoadedObject(_scene.GetScene()));

                default:
                    return(null);
                }
            }