添加了默认实例场景文件,默认示例文件。
优化了属性组的界面
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XericUI.OverrideUI;
|
||||
|
||||
namespace XericUIEditor.OverrideUI
|
||||
{
|
||||
[CustomEditor(typeof(XericUIrAttributeTextMeshProInputField))]
|
||||
[CanEditMultipleObjects]
|
||||
internal class XericUIrAttributeTextMeshProInputFieldEditor : Editor
|
||||
{
|
||||
#if dUI_TextMeshPro
|
||||
SerializedProperty _targetInputFieldProp;
|
||||
#endif
|
||||
SerializedProperty _entryTagProp;
|
||||
SerializedProperty _tagIndexProp;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
#if dUI_TextMeshPro
|
||||
_targetInputFieldProp = serializedObject.FindProperty("_targetInputField");
|
||||
#endif
|
||||
_entryTagProp = serializedObject.FindProperty("_entryTag");
|
||||
_tagIndexProp = serializedObject.FindProperty("_tagIndex");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUILayout.LabelField("XericUIrAttributeTextMeshProInputField", EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.HelpBox(
|
||||
"此组件为 TMP_InputField 的标记附加器,需挂在与 TMP_InputField 同一个 GameObject 上。\n" +
|
||||
"_entryTag 和 _tagIndex 用于反射界面生成器自动绑定。",
|
||||
MessageType.Info);
|
||||
|
||||
#if dUI_TextMeshPro
|
||||
EditorGUILayout.PropertyField(_targetInputFieldProp);
|
||||
#endif
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Reflection UI Attribute Tag", EditorStyles.boldLabel);
|
||||
|
||||
if (_entryTagProp != null)
|
||||
EditorGUILayout.PropertyField(_entryTagProp);
|
||||
|
||||
if (_tagIndexProp != null)
|
||||
EditorGUILayout.PropertyField(_tagIndexProp);
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed1041e7533d7024a9e5e62b888082ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user