*

Brick

  • ***
  • 25
    • View Profile
Trying a DoTween move in the ProAnimation Example.. not working
« on: September 01, 2015, 11:17:19 AM »
Hi i have a Canvas and 2 menus. Menu 1 is a pause menu and centered on the screen when toggled. Menu 2 settings menu is off the screen but on same canvas.
The pause menu contains a button 'Setting'. What i am trying to do is when someone clicks on the Settings button the canvas moves by 805 .. But this is not happening.

As with the Pro Animation Basic example, I have placed an animation on the container GameObject within the UICanvas that holds the 2 menus. I have added a DoTween Animation component to the game object and set it to move by 805 and unchecked the autoplay button.

Now on the 'Settings' Button in the pause menu on the onClick i have added the GameObject container and selected onClick Animation.DoPlay.

When i run this nothing happens. I click the button and it doesnt seem to fire.

Any help would be great as it looks to be identical to the example. A simple Move animation on the x Axis.

Thanks

Daniel


EDIT: Ok I found out why it is not playing. this is down to the fact that the pause menu stops the time and there for it is not updating.

However i have set in the preferences for the TmeScale to be independent check box. But this is not make it work..

Question: Should the animation be playing as the Timescale is ticked to independent? - see attached.   The call to stop the game time i am using is( Time.timeScale = 0; )

Thanks

Daniel



EDIT: SOLVED
Use a coroutine to fire the animation via code and not the editor.
« Last Edit: September 01, 2015, 03:51:40 PM by Brick »

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Trying a DoTween move in the ProAnimation Example.. not working
« Reply #1 on: September 03, 2015, 11:58:44 AM »
Hi Daniel,

Sorry for the late reply. The solution is actually to set the "ignore TimeScale" checkbox on the DOTweenAnimation Inspector.

Cheers,
Daniele

*

Brick

  • ***
  • 25
    • View Profile
Re: Trying a DoTween move in the ProAnimation Example.. not working
« Reply #2 on: September 03, 2015, 12:40:41 PM »
Hi Thanks for the reply, it wasnt actually working initially when i set the tick box.. however it does seem to work fine now.

Cheers

Daniel