I have a UI transition in the On Start cutscene file:
And this runs this asset file:
However, if I skip the On Start cutscene, it repeats the transition asset file endlessly, unless I place this at the end of my On Start cutscene:
You'll notice it is a copy of the last action in the transition asset file. Is there a way of having AC also go through every action in embedded asset files?
Comments
AC 1.65.2
Unity 2018.2.10f1
Here are the properties of both cutscene and embedded actionlist:
Excellent method, I've set this all up now, thanks! The only thing that would be nice is to have Overlay to disable completely when the animation is finished to save resources. I've animated in so that the image renderer child-object is disabled and enabled by the animator, but I can't obviously do this for the parent Overlay object with the Canvas, canvas scaler, graphic renderer and animator on. Can AC toggle such menus on and off when the animation is complete, without having to add the "wait 0.5 seconds" and "turn off menu" to disable the Overlay? Using a single menu in this means it's no longer possible to manually turn the menu off to save resources.
The performance impact of a single UI Canvas will be minimal - I wouldn't worry about the resources saving here, to be honest.
If you rely on the auto-playing of transition animations, however, the Canvas will be turned off automatically after the Transition time (s) time is exceeded once the Menu has been called to turn off. See the Manual's "Unity UI menus" chapter - specficically, the "Custom Animation" option.
I replaced everything as you described and I am using a single "turn on menu" onStart which automatically handles the overlay animation. Should I also have a close menu node in the action list? I have the transition speed set to 0, does the menu not close in this event?
You can try using the Menu: Change state Action in your Save menu's ActionList on turn off? to instantly turn the menu off.
It won't close unless you tell it to, and the transition speed should be set to match the duration of your animation.
Just to clarify, the two animations are a box wipe in, and a box wipe out; here you can see box wipe out plays as the scene exits, and the box wipe in plays as the scene begins:
https://gfycat.com/RapidPessimisticFlatfish
Using the single menu method, I'm not able to get boxwipeOut to play at any point, is this because I've set up the animator wrong?
The boxwipeIn animation plays fine as long as I don't set the transition time to anything greater than 0, otherwise it doesn't play. Why would this be?
Assuming that your four animations are correctly set up, try making OffInstant the default.
Just to clarify a couple of points
Should OffInstant be the default animation transition from entry? Just wanting to be totally clear on how this should be set-up and if there's anything I've missed at all? I'm still not sure how to get the box to close up to black if I turn off the menu.
Yes.
Yes.
Yes.
Yes.
Yes.
That's what I was suggesting, but you could also try an empty animation clip.
Turning it off won't show black, it should remove the black overlay. Bear in mind that this is all just my suggestion - I haven't put it into practice.
It seems that:
Sorry to be such a pain, it would be really nice to get these transition animations tidied up into a single, reusable menu that doesn't need sub-actionlists and actions at the end of each scene start and exit to ensure skipping works. On the plus side, I'm learning loads about how to use sprites complex from all of this!
There're too many unknown factors here to debug it. PM me a .unitypackage file of the Menu Manager, UI canvas prefab, Animator Controller and the 4 animation clips, and I'll see what's wrong.
Your menu had a non-zero Transition time (s) value, so I had to set this to a positive value.
Your package also didn't include the menu's graphics, so I couldn't see exactly how the animations played out - however the intended animations are played correctly. "On" runs when the menu is turned on, "Off" with turned off, etc. From the AC side of things, it looks like this is all correct - your animations just need to be correct.
Ahh, okay I get it now, I need to tick "fade" to trigger the animation and "wait until finish" for scene exits in particular, that's excellent, thanks for being patient with me, this works a LOT better than before!