public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(m_SizeMode);
            if (m_SizeMode.enumValueIndex == 0)
            {
                EditorGUILayout.PropertyField(m_Size);
            }

            InspectorFields.GraphicColorMultiField("Icon", o => o.GetComponent <VectorImage>());

            serializedObject.ApplyModifiedProperties();
        }
Пример #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);
        }