Create Characters in Maya, Photoshop and Unity 3
Making read/write animations using UnityScript Editor
Unity has its own built-in Animation Editor and it allows you to edit animations. It's actually very similar to the Animation Editor in Maya. You use curves to edit animations, but it also allows you to do some really cool things with scripts like activate scripts at different points through your animation. So let's take a look and we can see a couple of different techniques to use the Animation Editor. So I'm going to click on Window > Animation, and that's going to bring up our Animation Editor. Now, right now I have nothing selected in my Hierarchy so everything is blank here. I'm going to take a look at my game character, so I'll just click back here to the hierarchy.
And if I think about what is actually animating on my game character-- Let me just going to expand to look at the hierarchy here. The roots, so that's the exoskeleton and that's actually what's being animated as my character moves around. I'll just select root and switch back to my Animation Editor, so now I can see that I have root selected I now have some animation curves here. In my Animation list here, so there is a list all of the animations that are applied to what I have currently selected in the Hierarchy. So I can see that idle, walk, run, and jump animation attached to this component.
And if I scrub through in the timeline here I can play back and forth through that idle animation. Now another thing you might notice is that in this animation list all of these are labeled Read-Only, and if I tried to make any edits here in the Animation window I can't select anything. Everything is kind of grayed-out. So Unity actually prevents you from directly editing the animations that are attached to your character as of imports from Maya. That's actually a good thing because if you were to make edits to the animations here, if you try to open that file backup in Maya it may be corrupted.
So if we want to make changes to the animations attached to our game character we actually need to make a local copy of those animations and that will allow us to both read and write to those animations. So let's look at how we can make a read/write animation for our character. I'll just close out of the Animation Editor here, then in the Project panel I'll look at our Maya file that is our game character, and I'll just look at these animation components. So remember in the previous video we looked at how to set up the FBX Importer to automatically parse out these separate animations.
So I am going to go ahead and make a local copy of this run animation that we can edit inside of Unity. I'll duplicate this just by hitting Command+D. Okay, so there is my copy. I'm going to go ahead and rename this. I will just click Return to rename it. I'll name this Run-RW for run read/write. That will just make it easy to distinguish between this local copy and the read-only copy. And I'll go ahead and make a folder for this. So I'll go Create > Folder. I call this Animations-RW for read/ write, and just left mouse click and drag into that in Animations folder, and then I'll just go ahead and move this to the top level of my project directory.
Okay, so now I have my local copies of animations that I can go ahead and edit as I need to. So let's click back to our game character and in the Inspector take a look at this Animation component. Right now I want to replace that read-only copy with my read/write copy of the run animation. So I'll just click on this selector here and just double-click on run-RW, so that will switch out so that we now have the read/write animation applied to our character.
So back in hierarchy we click on root and bring back the Animation Editor. Now if we select the run read/write animation I can see the curves and now I can also make edits to those curves. So again I can scrub through. I can select the individual curves. So this is the rotation in the Y direction and I'll just grab one of these and drag it way down so we can see how that affects the animation.
And from here I can animate any part of the skeleton that I want. It's a pretty robust animation interface. So in the next video we'll talk about how we can use our read/write animation to call and access scripts.
Making read/write animations using UnityScript Editor provides you with in-depth training on 3D + Animation. Taught by Chris Reilly as part of the Game Character Creation in Maya
Creating Game Environments in Maya and Photoshop102,421 Views
Learn to Texture for Games58,077 Views
Maya Essentials 5: Animation Tools122,145 Views
Working with HumanIK Rigs in Maya40,628 Views
Maya Essentials 6: Lights and Rendering111,330 Views
Illustrator CC 2013 One-on-One: Fundamentals1,678,359 Views
Illustrator CC 2013 One-on-One: Mastery302,647 Views
iOS 8 App Development with Swift 1 Essential Training1,024,214 Views
Edge Animate Essential Training632,647 Views
Illustrator CC 2013 One-on-One: Advanced392,295 Views