Forum rules - please read before posting.

"Wait until finish" Animation issue

Unity version 2019.2.6f1 (64-bit)
AC version 1.69.3

"Wait until finish?" has suddenly stopped working for all animations (2D, 3D, character and object) in my game. I can fix it by putting an Engine Wait after each instance of this. However, my project is quite big at this point (over 200 scenes) so I can't really go back through to find every spot this is happening. I've been trying to figure out a fix for this with no luck.

There are no warnings or errors. The animations do play but the actionList doesn't wait, it moves right on to the next thing. And if it's a character that's set to "return to idle after", then the animation is skipped altogether and the character just goes to idle.

Any advice or pointers of where to look or what to check would be much appreciated.

«1

Comments

  • A sudden change wouldn't occur for no reason. When were things last working? A previous AC or Unity version?

    What animation engine are you making use of? Are you crossfading/transitioning to the new animations, or should they be changing instantly? Some examples of typical cases will help explain the issue.

    So that we're both testing with the same thing, open up the 2D Demo Managers+Scene and modify the "Bird_Use" Interaction so that the Character: Animate Action has Wait until finish? checked. Then run the scene and use the worm - does the issue occur then? I can't reproduce this on my end.

  • edited October 2019

    I'm using primarily Sprites Unity though I do have a couple scenes that are using Mecanim. My typical animations are not using transitions, they just switch instantly.

    I'm assuming it's something I did because I've been working through a bunch of bug fixes and polish. Though that was mostly small things like adjusting cutscenes here and there, adjusting sounds, updating artwork, etc. No script changes or anything. Everything had been working fine the day before and I hadn't updated AC or Unity.

    The 2D Demo scene works fine, even with "Wait until finish" checked.

    I've been digging more into this and it doesn't seem consistent. It may not be happening to all animations. Though the ones it is happening to have no clear correlation.

    However, I have been able to reproduce the issue consistently, using the following method:
    1. In a new scene
    2. Set up a hotspot that runs an actionList
    3. Set the actionList to play a custom animation on player, with both "wait until finish" and "return to idle after" checked
    4. Set the "On Start" cutscene to run the same actionList as the hotspot
    5. Result: the cutscene at the start doesn't play the animation but the hotspot does play the animation.

    Additionally, unchecking the "wait" and "return" options on the animation still produce the same results (starting cutscene not playing animation, while the hotspot does).

  • This sounds like a different error to the one you first reported. Are animations not playing, or are the Actions not waiting for them to finish? Or both?

    I wonder if this would occur in a fresh project - or if it's unique to this one. Please try it in another, if you can.

    If you've got a scene that shows the issue consistently, please PM it over as a .unitypackage file (the scene, the Player sprites, animation assets, and Animator Controller) so that I can see it for myself.

  • You're right, that was an unrelated issue/mistake on my part in that test scene.

    I couldn't for the life of me replicate this issue. It was definitely unique to my project but had no clear sign of why it was happening. It seems to be working fine now, even though I didn't change anything in the project. The only thing I did was duplicate the project and stripped down the duplicated one. Now for some reason the issue isn't happening in my main project.

    I'll keep an eye on it, in case it crops up again. Thanks for your help

  • Well, I may have spoke too soon. Looks like the issue is still happening in builds but not as widespread as before. Going to continue looking into it.

  • Odd. Again though, if you are able to create a .unitypackage file that reliably demonstrates the issue, I can take a look.

  • I have the same issue and it started nearly a year ago. "Wait until finish" is ignored, so instead I have to do an Engine:Wait that is equal to the length of the animation. I've encountered this on two completely different projects, with different Unity and AC versions.
    Let me know if I should PM a .unitypackage.

  • Some issues related to this were recently addressed - so if you're experiencing this in the most recent AC release then yes, please PM me a package that has the issue.

  • I am sorry to dig this one up again, but I encountered the same as armaan, and I always thought it was about Timelines, as there was a bug with this a while ago, and up to now, that problem only effects my Intro.
    I did not investigate further when a fix with Timeline handling was announced later, as I always skip the intro for testing the game ;)

    But now as I returned to it for refinement, I noticed that the problem still exists.

    I think I can narrow the problem that, at least for me, it only occurs on the third level of ActionLists (an ActionList calls an ActionList, that again calls an ActionList).

    To avoid massive ActionLists that are a bit tedious to edit, I like to split them up into smaller chunks.

    E. g. I have an OnLoad ActionList that checks certain conditions, one of them if the Intro has been played, and it not, it calls a "Master Intro" ActionList.
    In this one, different "cuts" of the Intro are stored in separate ActionLists to make it easier for changes.

    Until some 1.6x version, this worked good, but it stopped some time ago.
    Now I am on all newest versions (64-bit Unity: 2019.4.28, Timeline: 1.71, AC 1.75.2)

    In the second ActionList, all works fine (Engine:Wait, Timeline:Play etc. with "Wait until finish"), but as soon as the second ActionList calls a third one (like "Intro_Cut_01"), it behaves like "Wait until finish" isn't checked at all (on all Actions), so it does not even work to play two Actions in parallel (Timeline and a wait), which forced me to put the Wait into the MasterAction to avoid running all the actions that should occur after the Timeline to appear during the TimeLine.
    Turns out that this wasn't even necessary, as the "Wait until finish" worked well on the Timeline as well.

    Maybe that helps and it would be cool if this approach will work again in the future ;)

    Happy Easter to all :smiley:

  • Do you have an issue if you play Intro_Cut_01 directly - i.e. by assigning it as your OnLoad or OnStart cutscene?

    I'll need to see images that I can use to recreate the issue.

  • When I put "Master Intro" or "Intro_Cut_01" as OnLoad/OnStart in the scene, everything seems to work like intended.
    I will try to make some images of the mess I created during testing ;)

  • Ok, I hope this works.

    In the beginning, I did not use Timelines but large chains of Animations and Actions, so this approach was more logical than it might look now ;)

    This was the plan, and it worked in some earlier version, as mentioned:

    https://imgur.com/a/4FUIxms

  • What is the issue I'm looking for among these Actions? Are you saying that the long "Engine: Wait" Action in Intro_Take_00_Title is necessary for keeping the game in Cutscene mode?

    If it's only there to handle the fading, it's not necessary if you're using Timeline - AC's "Camera Fade" track can be used to fade the camera in and out.

  • No, it was only a try to prevent the actions following in OnLoad on the call of "Intro_Master" from happening before the Timeline ended, but this does not work, so during the Timeline Cutscene, all actions in OnLoad are executed while the Timeline is playing, regardless of all the WaitUntilFinish checkmarks, disturbing the intro e.g. with the Tutorial Window that follows later in OnLoad.

    I also tried loops checking if the ActionLists are still running, but that didn't work either.

    If I move all actions from "Take_00..." into "Intro_Master", all works fine AFTER the Timeline, like it should be.

  • Can you share shots of the Playable Director and Timeline? What is the Timeline's duration mode set to?

  • Okay here are the shots with a small sketch of the timing problem:

    https://imgur.com/Fbv8jLO

    But if it is a problem with the Timeline, it should also appear when using only two ActionList, right? But this works without problems.

    Maybe it is not a problem of the WaitUntilFinished, but more of a "when does an ActionList consider another ActionList as finished"?

    It looks like this to me:
    ActionList1 calls ActionList2 and waits for it to be finished.
    As soon as ActionList2 calls another ActionList, ActionList1 considers ActionList2 to be finished, although, in fact, ActionList2 is also waiting for the third one to be finished.

  • Thanks for the clarification.

    Is there any improvement if the Playable Director's "Wrap Mode" is set to "Hold"?

    Also, if you enable the AC Status box via the bottom of the Settings Manager, it will display which ActionLists are currently running. Is Intro_Take_00_Title listed for the duration of the Timeline - even if the "Engine: Wait" Action in that list is removed?

  • Changing the Wrap Mode to "Hold" did not change anything.

    In the status box, I can see at first the "OnLoad" ActionList.
    Then "Intro_Master" appears, and after that, "Intro_Take_00_Title".

    After the Timeline starts, "Intro_Master" disappears, and after that, "OnLoad".

    "Intro_Take_00_Title" stays, if I remove the Wait-Action or not, and then the next ActionList comes up, and then the one for the Tutorial-Window.

    At this point, I have to skip the Intro, as "Intro_Take_00_Title" disables the cursor and the Tutorial-Window slows gametime to a near halt ;)

  • I'm having trouble recreating this - despite setting up an ActionList flow following your diagram.

    There's a lot of cropping in your screenshots, though. Are you able to PM me a scene file + Timeline asset that demonstrates the issue?

  • Ok, I sent you something you can hopefully work with ;)

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.