UnityEditor.ParticleSystemWindow.Clear C# (CSharp) Method

Clear() private method

private Clear ( ) : void
return void
        internal void Clear()
        {
            this.m_Target = null;
            if (this.m_ParticleEffectUI != null)
            {
                this.m_ParticleEffectUI.Clear();
                this.m_ParticleEffectUI = null;
            }
        }

Usage Example

        private void ShowEdiorButtonGUI()
        {
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.FlexibleSpace();
            bool                 selectedInParticleSystemWindow = this.selectedInParticleSystemWindow;
            GameObject           gameObject     = (base.target as ParticleSystem).gameObject;
            GUIContent           hideWindowText = null;
            ParticleSystemWindow instance       = ParticleSystemWindow.GetInstance();

            if (((instance != null) && instance.IsVisible()) && selectedInParticleSystemWindow)
            {
                if (instance.GetNumTabs() > 1)
                {
                    hideWindowText = this.hideWindowText;
                }
                else
                {
                    hideWindowText = this.closeWindowText;
                }
            }
            else
            {
                hideWindowText = this.showWindowText;
            }
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(110f) };
            if (GUILayout.Button(hideWindowText, EditorStyles.miniButton, options))
            {
                if (((instance != null) && instance.IsVisible()) && selectedInParticleSystemWindow)
                {
                    if (!instance.ShowNextTabIfPossible())
                    {
                        instance.Close();
                    }
                }
                else
                {
                    if (!selectedInParticleSystemWindow)
                    {
                        ParticleSystemEditorUtils.lockedParticleSystem = null;
                        Selection.activeGameObject = gameObject;
                    }
                    if (instance != null)
                    {
                        if (!selectedInParticleSystemWindow)
                        {
                            instance.Clear();
                        }
                        instance.Focus();
                    }
                    else
                    {
                        this.Clear();
                        ParticleSystemWindow.CreateWindow();
                        GUIUtility.ExitGUI();
                    }
                }
            }
            GUILayout.EndHorizontal();
        }
All Usage Examples Of UnityEditor.ParticleSystemWindow::Clear