Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Resolved Problem with button animation between active and inactive objects

Discussion in 'Animation' started by LeoFeitosa, Feb 13, 2021.

  1. LeoFeitosa

    LeoFeitosa

    Joined:
    Jul 5, 2017
    Posts:
    30
    Hello everybody.
    I'm having trouble with button animations.
    I have two objects, the first containing the main menu buttons and the second containing the settings menu buttons.
    When I press the options button, the main menu is set to disabled "GameObject.SetActive (false)" o the options menu is set to true, inside the options menu there is a back button, which does exactly the opposite.
    This is the problem, when I press the back button the main menu is displayed, but the animations no longer correspond to the clips: normal, selected, pressed etc.
    Could anyone tell me why this happens and how to solve it?
     
  2. M-Elwy

    M-Elwy

    Joined:
    Jan 28, 2021
    Posts:
    36
    Have you re-activated the main menu
    "GameObject.SetActive(True)"
    ?
     
  3. LeoFeitosa

    LeoFeitosa

    Joined:
    Jul 5, 2017
    Posts:
    30
    yes I reactivated, the buttons appear but with a problem in the animations
     
  4. M-Elwy

    M-Elwy

    Joined:
    Jan 28, 2021
    Posts:
    36
    Do the buttons function correctly? If you pressed "Enter" or the button you use for submission, do any of the main menu buttons gets pressed (I mean as a function not animation)
     
  5. LeoFeitosa

    LeoFeitosa

    Joined:
    Jul 5, 2017
    Posts:
    30
    yes it works normally
     
unityunity