UnityEditor.ParticleEffectUI.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
        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();
        }

Usage Example

Exemplo n.º 1
0
        public void OnDisable()
        {
            SceneView.onSceneGUIDelegate       -= OnSceneViewGUI;
            EditorApplication.projectChanged   -= HierarchyOrProjectWindowWasChanged;
            EditorApplication.hierarchyChanged -= HierarchyOrProjectWindowWasChanged;
            Undo.undoRedoPerformed             -= UndoRedoPerformed;

            if (m_ParticleEffectUI != null)
            {
                m_ParticleEffectUI.Clear();
            }
        }
All Usage Examples Of UnityEditor.ParticleEffectUI::Clear