Skip to content

02. UniSWF

Bryan edited this page May 17, 2024 · 14 revisions

If you are not using UniSWF for your project, please skip to section 03. Texture Tagging of the manual.

Table of Contents

What is UniSWF?

UniSWF is a flash animation to Unity converter. When a user imports a .SWF file in Unity, UniSWF will prompt the user to parse the animation into something Unity can process with "MovieClipBehaviour" components.

UniSWF offers the possibility of parsing said animation with several default parameters. Although handy, these base configurations focus on completion but not fidelity and high image quality.

Thankfully, the TextureSwapper system possesses a default preferences preset file that can help you export your flash animations with the highest quality possible. You can read more about UniSWF in its documentation.

Where to Start With UniSWF?

First of all, you need a .SWF file formatted for UniSWF, for that you would need the following dependencies:

  • JPEXS.

  • Adobe Animate / Flash.

  • Unity.

JPEXS

  • Isolate and export the individual .SWF animation files to parse with UniSWF using JPEXS' right-click context menu.

  • Open the isolated files in JPEXS and save the files as ".FLA" to process these files with Adobe Animate / Flash in a later part of the process.

Adobe Animate / Flash

  • Select the animation closer to the one you want to parse with UniSWF to Unity in Adobe Animate / Flash.

  • Convert it to a "Movie Clip" in Animate by right-clicking the symbol and navigating to the "Properties" window in the context menu.

  • Name the "Symbol" in the "Name:" input box.

  • Enable the "Export for ActionScript" checkbox.

  • Name the "ActionScript Linkage" in the "Class:" input box.

  • Accept any warnings that may appear.

  • Use "Ctrl + Alt + Shift + S" or "File > Export > Export Movie..." to export the animation as a .SWF file.

Unity

  • When importing the formatted .SWF file in Unity click "Don't Export" in the popup window.

  • Right-click your imported .SWF file in Unity and click "Show In Folder" in the context menu.

  • Search for the ".swfoptions" file associated with your imported .SWF file. Usually, this file possesses the same name as your formatted .SWF file.

  • Delete the ".swfoptions" associated with your imported ".SWF" file.

  • Copy and paste the "default preferences preset file" in the same folder your imported .SWF file resides.

  • Rename the copied "swfoptions" to the same name as your formatted .SWF file.

  • Go to "Window > uniSWF > Export Options" and click your imported .SWF file.

  • Look for the "Texture filter mode" option, click the dropdown menu and select "Editor override".

  • Click the "Export Actions" drop-down menu.

  • Click on the "Export '[.SWF FILE NAME]'" button.

  • A new window of UniSWF will open, wait for its processes to finish, and then close the UniSWF2 Converter window when it displays the text: "No jobs active".

  • Return to Unity and wait for the "Swf '[.SWF FILE NAME].swf' : Exported Successfully" message displayed in the console.