Forum rules - please read before posting.

Animated Sprite in Menu

I have a menu created that displays sprites vertically in order to display achievements. Each sprite represents an in-game achievement.

I want the menu to change this sprite when the achievement is unlocked by using a variable.

I am unsure how to do this. I have made a sprite sheet contained both the activate and inactive achievement variable. Whenever I attach this sprite to my Achievement Label background texture it displays the entire sprite sheet.

Is there a way to get this working?

Thanks for the help, any would be very much appreciated,
Exile22

Comments

  • In Unity UI or AC's menu system?  AC's menu system relies on textures, not sprites, because it uses the old OnGUI code.  However, if you arrange all frames in one texture (grid based is fine), then you can click "Animate?" in the element properties box to input the frame arrangement.  (You'll need a Graphic element, rather than a Label one).
  • Hi, i'm trying to achieve the same. Would need animataed sprites in some menus (like Character selection) but i didn't find any "Animate?" option anywhere.
    How can i put an animated tecture for example on a button? Thanks

  • edited August 2023

    For animated buttons, use Unity UI.

    You can then set your UI Button component's Transition property to Animation, which allows you to make use of a regular Unity Animator component to control its appearance.

    Animating the button's background would then be a case of creating a sprite-swap animation for its Image sprite.

  • Thanks for your suggestion but did not work :(
    Made a UI menu, created button, choosen animated, created animator controller but animation is not working...
    Also in animation preview nothing moves

  • yt say "sprite missing" but the sprite is there...
    image

  • Ok done! i used the record button and now works :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.