A quick update.
As always, if you face any issue with GAF plugins please report it on our Forum or contact us directly.
The GAF team.
What was fixed in the release:
1) Memory leaks fixes;
2) Sounds feature fixes;
3) Name parts fixes (instant names);
4) Fix of strange motion in GAF animation when scaling textures in nesting mode;
5) Now to unload asset's textures resources you can use the method dropLoadedTexturesReferences() from GAFAnimationAsset class;
6) Now to call "create prefab", "add to scene" or "prefab+instance" from code you can use proper methods from GAFAnimationAssetInternalEditor class, that located in the namespace GAFEditorInternal.Assets. Namespace GAFEditorInternal is available only in the editor;
7) Correct animation batching fix for unity 5.5.x;
8) "Contat Us" changed to "Contact us" (typo fix);
9) New "Helpers" category in the GAF menu contains script to rebuild resources for all GAF animations on the scene;
10) Other bug fixes and optimizations
Before installing this new version, please delete the previous one in your project!
If you believe you need to recreate (NOT RECONVERT) any of your animation game objects, first refer to "GAF" --> "Helpers" menu and "Rebuild resources in scene".
We wanted to say a big thanks to all our users who reported bugs and issues and thus helped make our product better! This release contains fixes that solve all reported issues.
We're always glad to get feedback from our users! So if you have something to say regarding the new release then leave a comment below or write to us directly.
The GAF Team.
Using frame animation in Unity3D
As soon as the new animation is created, the link to the animation component SpriteRenderer appears. Unity then prompts the user to drag the frames to the animation window.
A few mouse clicks and the new animation is in your scene! The goal for a one second clip is about 15-20 frames. But what if the character includes many different movements such as run, plant, water plants, play, get a suntan, etc. The resulting duration of the animation would end up being many seconds and possibly a thousand frames. This was indeed our case. Although we had a simple scene, it took more than a minute to load and Unity started to crash because of the RAM exhaustion. We tried using the built-in Unity SpritePacker to pack sprites in atlases but that resulted in an insignificant 10-20% performance improvement.
Possibility of replacing frame animation with skeletal animation
To achieve more significant results, one option would have been to change from frame animation to skeletal animation. Instead of sprites we would have to go to a more complicated pattern (model) with the character drawn from parts of the atlas.
But our artist had already created all the animations in Flash. Upon further research we discoverd the GAF Converter Plugin in the Unity Store, and found it to be the best solution to greatly reduce frames and solve our crashing problem.
Importing animations from Flash to Unity with GAF Converter Plugin.
Here's a summary of how we did this.
Import GAF from the Unity AssetStore.
Drag file *.swf into the converter window.
Create an object and customize it. All the settings are intuitive:
The animations were created automatically by the markup contained in Flash.
To run the necessary animation using scripting:
using GAF.Core;//Use the space of GAF names
public class Mouse : MonoBehaviour
//Declare and mark link in the inspector
[SerializeField] private GAFMovieClip GAFMovieClip;
void Update ()
if (Input.GetKeyDown(KeyCode.RightArrow))//When pressing “right” key
GAFMovieClip.setSequence("run", true);//Run the clip “run” cyclically
Configuring transitions in Unity Animator
In Pro GAF version there is the option to use the native Unity-animator which makes the development a lot easier. But we needed to keep in mind that our type of animation didn't support mixing. Unity mixes clips by default. Our animations would distort on transition between clips. So we turned off the mixing of clips to enable our animation to work smoothly:
Editing animation clips
If it turns out that you didn’t create all the needed clips in Flash you can create them directly in Unity by using the function updateToFrameAnimator() and point at the needed frame.
Results using the GAF Plugin for Unity
The new animations created by using GAF reduced the time to load the scenes by 10X! In addition, RAM consumption was also reduced by about 2X. We're happy we found the GAF Plugin in the Unity Store! It really saved us on this project.
Solution 1: Spritesheets
By far the easiest: export each image from Flash and put it into a spritesheet. But with opponents as big as 300x500px with 10 seconds worth of animation, it would mean a couple of 4000x4000 atlas images or 1FPS animations to make it bearable for that poor RAM. These and any combo of compromise in between are obviously out of the question.
Solution 2: Use an in-house Flash exporter
The exporter was made and all, but it could only export animation with little complexity and couldn’t do many features, it would limit us in what we could do and using it is not flexible, improving it would be an option, but an expensive one.
Solution 3: Use Spine
Spine is a great animation software that can export for Unity. It is flexible and allows for easy and professional work. As we began to learn a little about the software, we realized we were way more comfortable in Flash (we come from a flash background). Really learning to do professional work on it would be expensive for the time and money we had available. It is a viable solution but we wanted an easier one.
Solution 4: Use Unity’s animation module
Seriously, it seemed to be less flexible than Spine, less friendly too for the complexity of what we had to do and we knew very little about it, we still used it for some simple animations in the game.
Solution 5: Use a Flash exporter from the asset store
To my knowledge there are currently 2 that work very well. Tried both of them and we found a winner: GAF.
GAF: give swf, receive result.
First time I used GAF I was wowed. Without knowing anything about it, I just put our company’s previously made flash intro bumper animation in the machine and it gave me back a working GameObject with the full animation in all its 5-6 levels of nesting, transparency masks, color transformations and skewing glory.
You must know that I fantasized about rendering this animation in-engine instead of resorting to video files since we made Toto Temple for all the consoles. Encoding for 8 different platforms is really a pain and then implementing it in 12 different ways is even worse.
We used GAF over its competitor for several reasons:
Simple support of Masks
Support of color changes
Ease of use on preparation, export/import and use of the result
Can determine the maximum sampling size to optimize sprite sheets
The animation can be exported as a GameObject that use exactly the same hierarchy and logic as any GameObject.
This last feature is what really sealed the deal. With this feature we could easily make animated dynamic pages and add custom behaviour to elements of the animation, all that using Unity’s common logic.
You can see that the collider follows the bunny, I just added a collider to one of the animated sprites and I now have a moving character!
This is magic, but it comes with its lot of quirks
First of all, the events are exported, this is awesome! But GAFs exported event system is really not an event system. To be able to use its event system as an event system, I had to create a shell script that would collect and “listen” to all the events and relay them to actual listeners.
Also, to get consistent results I had to create one .swf per exported animation, with the animation on the root level of the .swf
Also, updating an animation after you change the hierarchy, remove or add a sprite resulted in broken exports, I had to delete everything and restart. To help me in this, I created a script that would help me transfer the custom infos from one GAF object to the new one. Not a perfect system but better than nothing.
Also, as it is quite heavy on the process and in garbage collect, I don’t recommend using this for items that appear regularly in gameplay or simple animations, it is more for special elements that need complex animations than a solution that fits all needs.
Despite its flaws, I am literally awed by GAFs magic. If you want to make fluid and beautiful 2D animations for Unity and you are pretty fluent in Flash, GAF is your solution.
GAF Media is now used by over 5,000 game developers worldwide including some of the largest game studios. This is great validation for the value that the GAF solution provides to game developers as a means to reduce development schedule on their projects.
GAF Media has users spanning the globe across 70 countries located in North America, Asia and EMEA regions. Since the launch of GAF Media in 2014, users have made over 1 Million animation conversions with our tools.
GAF Converter is most often selected by its users to deliver a comprehensive solution to porting their animation to mobile. This saves the need to develop their own complex systems to port SWF files to mobile platforms.
Our GAF team is passionate about playing and developing games. This game development experience has led to deep understanding and comprehensive solutions to the animation processing needs of the game development community.
We would like to thank all our users for helping us with feedback to iterate towards an industry leading solution that helps game companies speed up their development cycles and get to market as fast as possible.
Hello GAF Users!
GAF Converter Version 5.2 is released.
What is in the release:
1) A lot of optimizations (up to x3 FPS improvement)
2) States caching (on asset and movieclip level) will increase your FPS but increase RAM consumption too (be careful with this option)
3) New Unity GAF Converter features (Extract Sounds, Add custom images into a Texture Atlas, Allow region rotation). More info can be found here: http://gafmedia.com/documentation/how-to/working-with-sounds and here: http://gafmedia.com/documentation/how-to/adding-custom-images-into-a-texture-atlas
4) Dispatch events\triggers support
5) Fixed issue with Unity3d v5.x support
6) A lot of fixes for Nesting mode
7) New sections in GAF dropdown menu (Documentation, Contact us)
8) WinPhone support
9) A lot of other important fixes
Before importing this version, please delete the previous one in your project!
Also, you will need to recreate (NOT RECONVERT) your animation game objects. Our code optimizations make this necessary.
Hope you will love it because this version is really fast and furious!
Have a nice day!
Hello GAF Users!
GAF Converter Version 5.1 is released.
In this release we fixed following bugs:
Have a nice day!
The GAF Team.
Hello GAF Users!
Exciting changes in our licenses!
Free license. The Free version now includes almost all the features (except CLI, Sounds, Custom images into a Texture Atlas). The Free license is for companies with less than $100,000 annual revenue.
With the Studio\Enterprise license you will get all GAF Converter features, fast and dedicated customer support, custom solutions (upon request) and additional seats.
Have a nice day!
The GAF Team.
Hello GAF Users!
This is one of the major updates of GAF Converter. Today we are releasing GAF Converter 5.0 with new features. We are excited to share the news with all of you! Try out the new Standalone GAF Converter 5.0! It is already available for download here.
New GAF Converter v5 features: