Exemple #1
0
 void OnEnable()
 {
     OnBaseEnable();
     m_MaterialAppBar    = (MaterialAppBar)serializedObject.targetObject;
     m_TitleText         = serializedObject.FindProperty("m_TitleText");
     m_PanelGraphic      = serializedObject.FindProperty("m_PanelGraphic");
     m_Shadow            = serializedObject.FindProperty("m_Shadow");
     m_Buttons           = serializedObject.FindProperty("m_Buttons");
     m_AnimationDuration = serializedObject.FindProperty("m_AnimationDuration");
 }
Exemple #2
0
        private bool ExternalPropertiesSection()
        {
            bool result = false;

            Func <GameObject, Graphic> getTitleTextFunc = go =>
            {
                MaterialAppBar appBar = go.GetComponent <MaterialAppBar>();
                return(appBar == null ? null : appBar.titleText);
            };

            Func <GameObject, Graphic> getPanelGraphicFunc = go =>
            {
                MaterialAppBar appBar = go.GetComponent <MaterialAppBar>();
                return(appBar == null ? null : appBar.panelGraphic);
            };

            Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorMultiField("Title Text", getTitleTextFunc, m_TitleText.objectReferenceValue as Graphic));
            Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorMultiField("Panel Graphic", getPanelGraphicFunc, m_PanelGraphic.objectReferenceValue as Graphic));

            return(result);
        }