fix
This commit is contained in:
parent
777cc90eaa
commit
8a6e84cc71
@ -27,7 +27,6 @@ internal class UXButtonEditor : UXSelectableEditor
|
|||||||
private SerializedProperty m_UXGroup;
|
private SerializedProperty m_UXGroup;
|
||||||
private SerializedProperty m_ChildTransitions;
|
private SerializedProperty m_ChildTransitions;
|
||||||
|
|
||||||
|
|
||||||
private ReorderableList m_ChildTransitionList;
|
private ReorderableList m_ChildTransitionList;
|
||||||
|
|
||||||
private static Color darkZebraEven = new Color(0.22f, 0.22f, 0.22f);
|
private static Color darkZebraEven = new Color(0.22f, 0.22f, 0.22f);
|
||||||
|
|||||||
@ -23,6 +23,7 @@ namespace UnityEngine.UI
|
|||||||
protected SerializedProperty m_Navigation;
|
protected SerializedProperty m_Navigation;
|
||||||
protected SerializedProperty m_MainTransition;
|
protected SerializedProperty m_MainTransition;
|
||||||
protected SerializedProperty m_Interactable;
|
protected SerializedProperty m_Interactable;
|
||||||
|
protected SerializedProperty m_animator;
|
||||||
|
|
||||||
// 抽象皮肤(现在放在基类)
|
// 抽象皮肤(现在放在基类)
|
||||||
protected GUISkin customSkin;
|
protected GUISkin customSkin;
|
||||||
@ -53,6 +54,7 @@ namespace UnityEngine.UI
|
|||||||
m_Navigation = serializedObject.FindProperty("m_Navigation");
|
m_Navigation = serializedObject.FindProperty("m_Navigation");
|
||||||
m_MainTransition = serializedObject.FindProperty("m_MainTransition");
|
m_MainTransition = serializedObject.FindProperty("m_MainTransition");
|
||||||
m_Interactable = serializedObject.FindProperty("m_Interactable");
|
m_Interactable = serializedObject.FindProperty("m_Interactable");
|
||||||
|
m_animator = serializedObject.FindProperty("_animator");
|
||||||
// load customSkin once in base; 调整路径为你项目中 GUISkin 的实际路径(必要时修改)
|
// load customSkin once in base; 调整路径为你项目中 GUISkin 的实际路径(必要时修改)
|
||||||
customSkin = AssetDatabase.LoadAssetAtPath<GUISkin>("Packages/com.alicizax.unity.ui.extension/Editor/Res/GUISkin/UIExtensionGUISkin.guiskin");
|
customSkin = AssetDatabase.LoadAssetAtPath<GUISkin>("Packages/com.alicizax.unity.ui.extension/Editor/Res/GUISkin/UIExtensionGUISkin.guiskin");
|
||||||
|
|
||||||
@ -322,7 +324,16 @@ namespace UnityEngine.UI
|
|||||||
|
|
||||||
EditorGUILayout.PropertyField(transition);
|
EditorGUILayout.PropertyField(transition);
|
||||||
|
|
||||||
var animator = graphic != null ? graphic.GetComponent<Animator>() : (target as UXSelectable).GetComponent<Animator>();
|
Animator animator = null;
|
||||||
|
if (target is UXSelectable anima)
|
||||||
|
{
|
||||||
|
animator = anima.GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
else if (m_animator.objectReferenceValue != null)
|
||||||
|
{
|
||||||
|
animator = (Animator)m_animator.objectReferenceValue;
|
||||||
|
}
|
||||||
|
|
||||||
switch (currentTransition)
|
switch (currentTransition)
|
||||||
{
|
{
|
||||||
case Selectable.Transition.ColorTint:
|
case Selectable.Transition.ColorTint:
|
||||||
|
|||||||
@ -57,8 +57,7 @@ namespace UnityEngine.UI
|
|||||||
protected static int s_SelectableCount = 0;
|
protected static int s_SelectableCount = 0;
|
||||||
protected int m_CurrentIndex = -1;
|
protected int m_CurrentIndex = -1;
|
||||||
protected bool m_EnableCalled = false;
|
protected bool m_EnableCalled = false;
|
||||||
|
[SerializeField] private Animator _animator;
|
||||||
private Animator _animator;
|
|
||||||
public Animator Animator => _animator ? _animator : _animator = GetComponent<Animator>();
|
public Animator Animator => _animator ? _animator : _animator = GetComponent<Animator>();
|
||||||
|
|
||||||
public static readonly Dictionary<string, int> _animTriggerCache = new()
|
public static readonly Dictionary<string, int> _animTriggerCache = new()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user