This is an export script made for the unity engine to convert unity particle systems to flyff-compatible SFX files. This script now also works for converting particle-type SFX parts, as well as billboard-type. For particles, we simulate unity particles using regular Flyff billboards. (Don't go too hard with particles, performance ingame might be bad... maybe? Try it)
turns into
Also, the particle potential (probably don't actually use this many particles)
The following are the only modules supported in the unity particle system, since they are the only ones that can be translated to work with Flyff keyframe SFX.
- Emission
- Color over lifetime
- Size over lifetime
- Velocity over lifetime
- Rotation over lifetime
- Noise
- Renderer
Copy the SFXExport.cs script into the Assets/Editor folder. That's it.
- You must place any textures you use for the particle system in Assets/Resources/SFXTextures.
- Create your particle system gameobject.
- You may add child particle systems do the parent particle system as well.
- Modify the particle material to play with the blend settings, like glow and blend.
- Save the gameobject as a prefab (drag it from the hierarchy window into the project window, in any folder).
- Select the prefab in the project window.
- Click on Tools -> Export Selected Particle Prefab to .SFX.
- The exporter will save the .SFX file in Assets/Exports, along with the textures that are used.
- Enjoy the hour you just saved by using curves instead of keyframes!
- Don't use any of the modules that are not supported (duh), as they won't allow you to export.
- Don't use modes that are not either constant or curve, for the modules that support those decisions.
- Don't forget to check the console, it's very helpful.
If something isn't working as expected, the first thing you should do is check the logs. Check your console and enable warnings too! If you do find a bug, feel free to create an issue or message me on discord (Frostiae#2809).