kyubuns/AkyuiUnity

How do I change the transition of the button component to sprite Swap instead of color Tint?

kane9527-e opened this issue · 2 comments

How do I change the transition of the button component to sprite Swap instead of color Tint?
What do you need to do in XD?

It is not supported as a basic function.
(The reason is that I can't decide which Sprite to Swap to; XD's State feature does too many things.)

Instead, a Trigger function that can be freely customized is provided.
https://github.com/kyubuns/AkyuiUnity/blob/main/Manual/Manual_en.md#triggers
https://github.com/kyubuns/AkyuiUnity/tree/main/Assets/AkyuiUnity/Extensions

This is a sample that retrieves all LayoutGroups in the generated Prefab and turns off enabled.
https://github.com/kyubuns/AkyuiUnity/blob/main/Assets/AkyuiUnity/Extensions/DisableLayouterTrigger.cs

Similarly, it is recommended to make changes from the script to take all Buttons and Swap them to a Sprite of a specific name in their children.
(This is done during Prefab generation, so there is no slowdown at runtime.)

Got it,Thank you