Example #1
0
        void Update()
        {
            if (ContextSource == null)
            {
                return;
            }
            BaseSceneConfig config = ContextSource.GetComponent <BaseSceneConfig>();

            if (config != null && config.Context != null && config.Context.Scene != null)
            {
                UnitySceneUtil.ImportExistingUnityMesh(this.gameObject, config.Context.Scene);

                Component.Destroy(this.gameObject.GetComponent <AddExistingMeshToScene>());
                if (DeleteOriginal)
                {
                    this.gameObject.Destroy();
                }
            }
        }
Example #2
0
        void Update()
        {
            if (ContextSource == null)
            {
                return;
            }

            BaseSceneConfig config = ContextSource.GetComponent <BaseSceneConfig>();

            if (config != null && config.Context != null && config.Context.Scene != null)
            {
                GOWrapperSO newSO = new GOWrapperSO();
                newSO.Create(this.gameObject);

                config.Context.Scene.AddSceneObject(newSO);

                Component.Destroy(this.gameObject.GetComponent <AddExistingGOToScene>());
            }
        }