- Home /
[Button with animator] vs. [Sprite with mousedetection]
I am making a very simple 2D game, with all of objects being in static positions, just changing their sprites, animations, doing some calculations/stuff upon hovering/clicking etc.
What is the best way to go about this - should I make everything a button and change their sprites runtime? Can the new animation stuff be safely used with buttons? The alternative is creating just a bunch of sprites, attaching colliders and using some mouse-detection script on these Sprites.
Is there a clear answer which of these would be the right way to do it? Is there a performance/safety cost related with this or is this just a matter of preference?
I also wonder which is the best way to make sprites clickable. I also want a context menu to show up around the sprite clicked.