SwfMesh Plugin documentation

Getting Started

⚠️ Closed Beta — SwfMesh is not yet on sale. Contact us for beta access.

Install SwfMesh, import a .swf, and get a first animation on screen.

Installation is the one genuinely engine-specific step - jump to your engine, then continue from First animation, which is the same for both.

Requirements#

Minimum
Unity 2022.3 or newer · 64-bit Windows editor and player
Godot 4.6 or newer · 64-bit Windows editor and export templates

Full platform support is in Platforms.

Install - Unity#

SwfMesh is in closed beta. Email hello@swfmesh.com for access - you will be sent a download containing SwfMesh-Unity-<version>.tgz and a .zip of the same package. Use whichever route suits you.

From the tarball. Open Window > Package Manager, click + (top left), choose Add package from tarball…, and select the .tgz. Unity installs and manages it from there. This is the recommended route.

From the zip. Unzip it and move the SwfMesh folder into your project's Packages folder, so you get <YourProject>/Packages/SwfMesh/. Unity picks it up automatically.

Do not put these files in your Assets folder. It compiles, so it looks like it worked, but package.json stops meaning anything - no version, no Package Manager entry, and updating becomes a manual delete. Packages/ is the correct home.

Install - Godot#

SwfMesh is in closed beta. Email hello@swfmesh.com for access, then unzip the download and:

  1. Copy the addons/swf_mesh/ folder into your project's addons/ folder, so it lands at res://addons/swf_mesh/.
  2. Restart the editor. The extension loads automatically - there is no plugin checkbox to tick.

Copy the folder as a single unit. Everything inside it resolves relative to res://addons/swf_mesh/, so splitting it up breaks those paths.

First animation#

Drag a .swf file into your project. The importer turns it into a SwfMesh asset. Then:

Unity - create an empty GameObject, add the Swf Player component, assign the imported asset to its asset field, and enter play mode. The component previews in the editor too, so you can scrub and frame your content without entering play mode.

Godot - add a SwfNode3D (for 3D scenes) or a SwfNode2D (for 2D scenes), assign the imported resource to the node's swf_resource property, and run the scene. The two nodes are the same player in a different dimension: the scripting surface is identical between them, so a script written against one works against the other.

First script#

Playback is controlled the way the original timeline would suggest. Every clip - the root timeline and every nested movie clip - exposes the same handful of methods.

csharp
// Unity
using SwfMesh;

public class Example : MonoBehaviour
{
    public SwfPlayer player;

    void Start()
    {
        player.Play();
        player.Clip.GetClip("head").GotoAndStop(1);
    }
}
gdscript
# Godot
extends SwfNode3D

func _ready() -> void:
    play()
    clip.get_clip("head").goto_and_stop(1)

Nested movie clips are reachable by instance name, so a clip authored as head can be addressed and controlled independently of its parent. The full surface is in Scripting API.

Settings#

Per-player options live on the Swf Player inspector in Unity and on the node in Godot. Project-wide defaults - global scale and default pivot placement - are under Project Settings > SwfMesh in Unity and Project Settings > swf_mesh in Godot.

The defaults suit most content. If your artwork consistently imports larger or smaller than you want, that is the scale setting, and it is adjustable at three levels - see Scale and pivot.

Troubleshooting#

Unity#

Nothing renders. Confirm the asset field is assigned and that the object is within the camera frustum - SwfMesh content is authored at Flash's coordinate scale and can be much larger or smaller than you expect.

The component appears but logs a plugin error. The native plugin ships as a 64-bit Windows library; a 32-bit or unsupported player target will not load it.

Godot#

The node types do not appear. The editor caches loaded extensions - restart it after copying the addon in. If they are still missing, confirm that res://addons/swf_mesh/bin/ contains the library files.

Something renders, but ordering looks wrong in 3D. Transparent geometry in 3D is sorted per object. Keep one animation per node rather than stacking several independent nodes in the same spot. See Limitations.

Next steps#