Forum rules - please read before posting.

Opening Cutscene Animation

Hello,

I'm relatively new at using AC, and so far it's been a breeze. I find myself stuck, however, with a problem that seems like it should be annoyingly simple to solve, yet has proven anything but.

I simply wish to have a short (15 sec) animation play right when you run the game, then load the first scene immediately after. The animation was made in AC from a png image sequence exported from photoshop.

I have tried creating an OnStart cutscene in my scene 00 and choosing Object: Animate in the ActionList, then dragging the animation into the Clip field.

Nothing happens. It simply starts the first scene minus the opening cutscene animation.

I have also tried making the animation the first scene, setting it as 0 in the build settings and adding an ActionList to the animation that I have dragged into the scene window. I make this ActionList a scene switch, switching to what I wish to be the first interactive scene (I make this scene 01 in the build settings.)

I have no idea if this is at all even remotely correct, but it was the only alternative I could think to try when the first solution given to me didn't solve the issue. I have scoured forums and asked teachers on Udemy. And still, here I am.

I am confused as to whether I need to have my animation in a separate scene which transitions to the interactive one, or whether it needs to be in the interactive one (in the scene window). If the latter is the case, do I need to switch to a separate camera from the one that is the default camera in the scene? I have tried this, giving the animation clip its own camera and programming an ActionList in the OnStart cutscene that switches to the second camera, and one that switches back once the animation has played. Still to no avail.

I apologize if any descriptions are unclear. I am still a newbie! And still finding my way around the jargon. Please ask me to elaborate if what I'm saying doesn't make a damn bit of sense!

Vast appreciation to anyone who can suggest anything that can point me out of this conundrum. Been at it for weeks now, and would like to move forward with the creation of my masterpiece ;D

Many, many thanks in advance!

-M

Comments

  • Welcome to the community, @Max.

    The playback of animation in an AC game is still handled by Unity - whether you're relying on an Animator component, or a Video Player, to handle animation playback.

    There's no restriction so far as how you set up your scenes go - having the animation in a separate scene, or in your first "proper" scene are both valid, so long as you have your ActionList block gameplay until the animation is finished.

    It's often best to split your game into scenes wherever appropriate, though, so let's stick to the two-separate-scenes method. For something as long as 15 seconds, I'd also recommend converting the png sequence into a movie file outside of Unity, so that you can import it as a video clip asset into Unity. That will allow you to make use of it in Unity's Video Player component.

    Once you've imported the converted video clip into Unity, create a new scene and add a Video Player component to a new empty GameObject. Assign your clip into the Video Clip field, set the Render Mode to Camera Near Plane, and set the Camera to your scene's MainCamera.

    Test things out by running the scene. If Play On Awake is checked, it should begin playing right away.

    So far, AC shouldn't be involved - this is all using Unity's own animation playback tools.

    Next, uncheck Play On Awake and use the Scene Manager to convert the scene into an AC one. Then, in your OnStart cutscene, add an Engine: Play movie clip Action. Set the Video player to the one in your scene, the Method to Play Movie, and check Wait until finish?.

    Then follow this Action up with a Scene: Switch Action to move to the next scene. Make sure both scenes are listed in Unity's build settings, and things should then work.

    If you still have issues, let's see some screenshots of your setup so that we can see exactly where things are going wrong.

  • Chris,

    Thank you for the instant reply. Wow!

    It is comforting to know that the solution IS more complex than I originally imagined. Makes me feel as though I haven't been clawing my eyes out for no good reason haha.

    My only question is if doing it as a movie file is absolutely necessary. I should have mentioned that the clip is 2D pixel art and I went through great pains originally to get it into Unity as crisp and clean as possible, using a pixel perfect camera and everything! But if you can point me in the direction of a way I can convert this in a way that is completely uncompressed and not blurry that would be awesome! I haven't been able to find a way so far, but I've just been using photoshop and quicktime.

    Thanks so much again for the feedback, my friend. This definitely seems like the way to go. It's so good to hear a solution that I haven't already tried. I just want to make sure my pixels aren't blurry!

  • That would be down to the settings of the original video file, when you render it out.

    But your original method of swapping individual sprite frames is still valid - don't let me dissuade you from using that instead if that's the better option for you.

    For this method, you'll rely on Unity's Animator / Animation system - again, you can get the animation itself up and running without AC. If you're new to Unity's Animation system, have a look through the official docs and tutorials. Many of them will be on animating characters with one-sprite-per-frame, but the only difference with an opening cutscene is that your sprites will take up the whole screen.

    Focus on just getting the animation playing in a non-AC scene. With the Animator component, you can assign a "default" animation clip that runs as soon as the scene begins - so you can get the cutscene animation playing, with the camera facing it, without need for AC.

    Then, when you're ready to incorporate it into your game properly, you can run a similar OnStart ActionList to the one above, only replacing your Engine: Play movie clip Action with an Engine: Wait Action of the same length of your movie.

    Go with the workflow that best suits your needs, but again - if you have trouble with the AC side of things, just post details and screenshot links here and we'll see what we can suggest.

  • Chris,

    You're the best. Going to read up on the animation system tutorials tonight and familiarize myself with the workflow a bit more. Then I'll try to put your instructions into practice. Which I've blocked out most of tomorrow for :)

    Be well, and of course, I will let you know if I get snagged along the way and/or when I make it on the other side of this thing!

    Thanks again for your generous help and support.

  • Hi Chris,

    I think I may be close, but I can't figure out how to set the animation as the default clip that plays when the scene begins. When I right click on it in the animator the option "Set as Layer Default State" is greyed out. Am I going in the right direction?

    Thanks!

  • The default animation should be highlighted yellow in the Animator - is that the case of the clip you're trying to make the default? If so, it should begin automatically - provided you don't use an Action to change its playback in your OnStart Cutscene.

    That'd be my first guess, but I'd need to see screenshots otherwise.

  • Chris,

    I got it. :smiley:

    Could not have done it without your help. After much trial and error, I realized I'd misunderstood, and was still trying to add the cutscene ActionList to the scene 01 instead of 00 (which really doesn't make sense now that I realize exactly what it was you were directing me to do). Once I realized my error it all clicked into place. Runs like a dream.

    Thank you so much for your clear direction and instant replies.

    I'm sure I will be back here soon!

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.