UnityEditor.ParticleEffectUI.OnGUI C# (CSharp) Method

OnGUI() public method

public OnGUI ( ) : void
return void
        public void OnGUI()
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            if (this.m_Emitters != null)
            {
                this.UpdateProperties();
                OwnerType type = !(this.m_Owner is ParticleSystemInspector) ? OwnerType.ParticleSystemWindow : OwnerType.Inspector;
                if (type == OwnerType.ParticleSystemWindow)
                {
                    this.ClampWindowContentSizes();
                    bool verticalLayout = m_VerticalLayout;
                    if (verticalLayout)
                    {
                        this.MultiParticleSystemGUI(verticalLayout);
                        this.WindowCurveEditorGUI(verticalLayout);
                    }
                    else
                    {
                        GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                        this.MultiParticleSystemGUI(verticalLayout);
                        this.WindowCurveEditorGUI(verticalLayout);
                        GUILayout.EndHorizontal();
                    }
                }
                else if (type == OwnerType.Inspector)
                {
                    this.SingleParticleSystemGUI();
                }
                else
                {
                    Debug.LogError("Unhandled enum");
                }
                this.ApplyModifiedProperties();
            }
        }

Usage Example

        void OnGUI()
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            if (s_Icons == null)
            {
                s_Icons = new GUIContent[] { EditorGUIUtility.IconContent("HorizontalSplit"), EditorGUIUtility.IconContent("VerticalSplit") }
            }
            ;

            if (m_Target == null && (Selection.activeGameObject != null || ParticleSystemEditorUtils.lockedParticleSystem != null))
            {
                InitEffectUI();
            }

            DoToolbarGUI();

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