How can I extend an UI Component and change it's default values when added on editor?
I want to extend the button component and change it's default transition to Animation, I know how to extend, what I can't figure out is where to change the default values to reflect them in the editor when the component is added.
Here you can see that the Selectable class assign the default values at declaration time. https://bitbucket.org/Unity-Technologies/ui/src/0155c39e05ca5d7dcc97d9974256ef83bc122586/UnityEngine.UI/UI/Core/Selectable.cs?at=5.2&fileviewer=file-view-default
// Type of the transition that occurs when the button state changes.
[FormerlySerializedAs("transition")]
[SerializeField]
private Transition m_Transition = Transition.ColorTint;
How can I override that if I extend from Button who in turn extends from Selectable?
Comment