SetVector3() static private method

static private SetVector3 ( string key, Vector3 value ) : void
key string
value Vector3
return void
コード例 #1
0
        public void Clear()
        {
            ParticleSystem root = this.GetRoot();

            if (this.ShouldManagePlaybackState(root) && (root != null))
            {
                PlayState playing;
                if (this.IsPlaying())
                {
                    playing = PlayState.Playing;
                }
                else if (this.IsPaused())
                {
                    playing = PlayState.Paused;
                }
                else
                {
                    playing = PlayState.Stopped;
                }
                int instanceID = root.GetInstanceID();
                SessionState.SetVector3("SimulationState" + instanceID, new Vector3((float)instanceID, (float)playing, ParticleSystemEditorUtils.editorPlaybackTime));
            }
            this.m_ParticleSystemCurveEditor.OnDisable();
            ParticleEffectUtils.ClearPlanes();
            Tools.s_Hidden = false;
            if (root != null)
            {
                SessionState.SetBool("ShowSelected" + root.GetInstanceID(), this.m_ShowOnlySelectedMode);
            }
            this.SetShowOnlySelectedMode(false);
            GameView.RepaintAll();
            SceneView.RepaintAll();
        }
コード例 #2
0
        public void Clear()
        {
            ParticleSystem root = ParticleSystemEditorUtils.GetRoot(m_SelectedParticleSystems[0]); // root can have been deleted

            if (ShouldManagePlaybackState(root))
            {
                // Store simulation state of current effect as Vector3 (rootInstanceID, isPlaying, playBackTime)
                if (root != null)
                {
                    PlayState playState;
                    if (IsPlaying())
                    {
                        playState = PlayState.Playing;
                    }
                    else if (IsPaused())
                    {
                        playState = PlayState.Paused;
                    }
                    else
                    {
                        playState = PlayState.Stopped;
                    }
                    int rootInstanceId = root.GetInstanceID();
                    SessionState.SetVector3(k_SimulationStateId + rootInstanceId, new Vector3(rootInstanceId, (int)playState, ParticleSystemEditorUtils.playbackTime));
                }

                // Stop the ParticleSystem here (prevents it being frozen on screen)
                //Stop();
            }

            m_ParticleSystemCurveEditor.OnDisable();
            Tools.s_Hidden = false; // The collisionmodule might have hidden the tools

            if (root != null)
            {
                SessionState.SetBool(k_ShowSelectedId + root.GetInstanceID(), m_ShowOnlySelectedMode);
            }
            SetShowOnlySelectedMode(false);

            GameView.RepaintAll();
            SceneView.RepaintAll();
        }
コード例 #3
0
        public void Clear()
        {
            ParticleSystem root = this.GetRoot();

            if (this.ShouldManagePlaybackState(root) && (UnityEngine.Object)root != (UnityEngine.Object)null)
            {
                ParticleEffectUI.PlayState playState = !this.IsPlaying() ? (!this.IsPaused() ? ParticleEffectUI.PlayState.Stopped : ParticleEffectUI.PlayState.Paused) : ParticleEffectUI.PlayState.Playing;
                int instanceId = root.GetInstanceID();
                SessionState.SetVector3("SimulationState" + (object)instanceId, new Vector3((float)instanceId, (float)playState, ParticleSystemEditorUtils.editorPlaybackTime));
            }
            this.m_ParticleSystemCurveEditor.OnDisable();
            ParticleEffectUtils.ClearPlanes();
            Tools.s_Hidden = false;
            if ((UnityEngine.Object)root != (UnityEngine.Object)null)
            {
                SessionState.SetBool("ShowSelected" + (object)root.GetInstanceID(), this.m_ShowOnlySelectedMode);
            }
            this.SetShowOnlySelectedMode(false);
            GameView.RepaintAll();
            SceneView.RepaintAll();
        }