I've ran into a weird problem with GUI.
I'm trying to set up Fade animation for when GUI is turned on/off.
I have created four states for the GUI, just like it's mentioned in the Manual:
Each animation is really basic:
OnInstant - it's just one frame with the GUI being visible
On - GUI slides in off screen to it's position
Off - GUI slides out from it's position to off screen
OffInstant - single frame with GUI being off the screen
The GUI itsefl is set up like this in AC Menu Settings:
What happens is whenever I do Menu: Change state and Turn Off/On with Fade? ticked on the GUI just disappears/appears instantly. I have exactly the same set up for one of the other GUI's but the other one is animating just fine.
I can't find a reason for this being an issue. Are there some very specific circumstances where this set up would not work?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You still need to set a non-zero Transition time (s) value. Regardless of whether animation is used or not, the Canvas will be disabled after that time when the Menu is turned off.
Hmm, sadly this has no effect on the GUI at all - it disappears as soon as I run Menu: Change state.
On my other GUI the Transition time (s) also has no effect, but the animation plays as expected regardless of what transition time I set.
You'll need to set the time value to match the duration of your On/Off animations, which are assumed to be the same length.
If you open the Animator window for the Canvas at runtime, are the On/Off animations bypassed completely in favour of OnInstant/OffInstant?
Perfect. It was a matter of matching the time value on the Transition time(s): to the animation length. Both are now set to the same thing and it works as expected.
Thank you!