Hi
Recently started using Adventure Creator to make my very first (adventure) game. I'm in the process of following the tutorial. I'm having problems and confusion with animation though. I've tried following the written guide, adding an animation I made in After Effects - both as a GIF and as PNG - and I've added an idle sprite I made in Illustrator, but I can't for the life of me get it made into an animation that works in AC, whether in Animation or Animator. I'm so confused as to what I'm doing wrong and why. The sprite I have is a PNG.
Help would be much appreciated. Thanks.
Comments
AC leverages Unity's own animation systems, rather than doing anything particularly unique or special - if you're unfamiliar with how Unity's animation system works, I do recommend going through Unity's documentation on it first. Incorporating animation into AC adds another layer of complexity, so it's important to understand the way animation works before tying it into your character.
We'll need some more details in order to help specifically - right now, it's not clear if the problem lies with the creation of the animation itself, or with getting it to play in AC. If you could elaborate, and provide any relevant screenshots that show your setup and what you've got so far, then we can look to give you some specific advice.
Presumably, your character is set up to use the "Sprites Unity" animation engine - is that correct? Besides the video tutorials and Manual, a text-based tutorial for setting up 2D characters can be found here.
Yeah, the text-based tutorial was what I was following yesterday and yes, I'm using Sprites Unity. I tried creating a new character via the Create New Character Wizard, dragging and dropping my sprite into the field. So far I only have an idle sprite, but I read that even these need to have their own animation. I tried dragging and dropping it into the Animation and Animator windows, but I get a 'no' sign appear every time. Even with my 'dummy' animation I have that has multiple frames after turning it into a PNG in After Effects.
I have noticed that when I select my sprite it comes up with a warning in Inspector that says 'Only textures with width/height being multiple of 4 can be compressed to DXT5 format'. Could this be responsible?
When working with "multiple frame" sprites, be sure to work with the individual sprites themselves (which can be found by expanding the original image file in the Hierarchy), and not the image file itself.
in Inspector that says 'Only textures with width/height being multiple
of 4 can be compressed to DXT5 format'. Could this be responsible?
No, that's just about texture compression which aids performance / file sizes.
Are you dropping sprites into the Animation window? Try instead keeping your Animator (with controller assigned) selected, then create a new Animation clip in the Animation window. Then, with the Record button enabled, drop the sprite not into the Animation window, but into the "Sprite" field of your character's Sprite Renderer component.
Again, please show images if you'd like more specific help - but it sounds like this is more to do with the actual creation of Unity animations, rather than having them play within AC.
By the 'no' sign I mean that there's a circle with a line through it whenever I try to drop a PNG file into the Animation window. I thought you could just drop them straight in, but like you say - you have to click on 'Create' first, name the animation, and THEN drop the image into it.
Also, I've set the player's starting position the same as in the tutorial (far left), but when I run the demo the player is positioned below the tree.
Make sure that the Transform of your sprite child has a local position of 0,0,0.
If it does, try dropping the provided 2D Demo player, /AdventureCreator/2D Demo/Resources/Brain2D, into the scene to see if he has the same behaviour.