modify
This commit is contained in:
parent
acd6338626
commit
1998b9db2d
@ -484,7 +484,7 @@ internal class UXButtonEditor : Editor
|
|||||||
if (controller != null)
|
if (controller != null)
|
||||||
{
|
{
|
||||||
if (animator == null)
|
if (animator == null)
|
||||||
animator = (target as Selectable).gameObject.AddComponent<Animator>();
|
animator = (target as UXButton).gameObject.AddComponent<Animator>();
|
||||||
|
|
||||||
UnityEditor.Animations.AnimatorController.SetAnimatorController(animator, controller);
|
UnityEditor.Animations.AnimatorController.SetAnimatorController(animator, controller);
|
||||||
}
|
}
|
||||||
@ -514,11 +514,11 @@ internal class UXButtonEditor : Editor
|
|||||||
var path = GetSaveControllerPath(target);
|
var path = GetSaveControllerPath(target);
|
||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
return null;
|
return null;
|
||||||
SerializedProperty normalTrigger = property.FindPropertyRelative("normalTrigger");
|
SerializedProperty normalTrigger = property.FindPropertyRelative("m_NormalTrigger");
|
||||||
SerializedProperty highlightedTrigger = property.FindPropertyRelative("highlightedTrigger");
|
SerializedProperty highlightedTrigger = property.FindPropertyRelative("m_HighlightedTrigger");
|
||||||
SerializedProperty pressedTrigger = property.FindPropertyRelative("pressedTrigger");
|
SerializedProperty pressedTrigger = property.FindPropertyRelative("m_PressedTrigger");
|
||||||
SerializedProperty selectedTrigger = property.FindPropertyRelative("selectedTrigger");
|
SerializedProperty selectedTrigger = property.FindPropertyRelative("m_SelectedTrigger");
|
||||||
SerializedProperty disabledTrigger = property.FindPropertyRelative("disabledTrigger");
|
SerializedProperty disabledTrigger = property.FindPropertyRelative("m_DisabledTrigger");
|
||||||
|
|
||||||
var normalName = string.IsNullOrEmpty(normalTrigger.stringValue) ? "Normal" : normalTrigger.stringValue;
|
var normalName = string.IsNullOrEmpty(normalTrigger.stringValue) ? "Normal" : normalTrigger.stringValue;
|
||||||
var highlightedName = string.IsNullOrEmpty(highlightedTrigger.stringValue) ? "Highlighted" : highlightedTrigger.stringValue;
|
var highlightedName = string.IsNullOrEmpty(highlightedTrigger.stringValue) ? "Highlighted" : highlightedTrigger.stringValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user