Sorry,I think that I didn’t say clearly.
I want coin UI have animate,not just a static pic.so I use AnimateSprite2D to make this.
but I also think, In UI control container only can use UI node.should not use AnimateSprite2D.(it has aligenment problem, It can only be adjusted manually.)
I want find the better way (the correct way) to achieve this animation effect.
You can use Node2D nodes with Control (UI) nodes. It’s just that they don’t have the fancy sizing behavior Control nodes have
I would put a Control node as parent of the AnimatedSprite2D. Match the size and alignment manually and you get pretty nice behavior as long as you don’t need to resize the AnimatedSprite2D