OnGUI() public method

public OnGUI ( ) : void
return void
        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();
            }
        }
Exemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins);

            ShowEdiorButtonGUI();

            if (ShouldShowInspector())
            {
                if (m_ParticleEffectUI == null)
                {
                    Init(true);
                }

                EditorGUILayout.EndVertical();
                EditorGUILayout.BeginVertical(EditorStyles.inspectorFullWidthMargins);

                m_ParticleEffectUI.OnGUI();

                EditorGUILayout.EndVertical();
                EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins);
            }
            else
            {
                Clear();
            }

            EditorGUILayout.EndVertical();
        }