Exporting effects

Exporting effects

While you design an effect it is stored in the editor's own binary format, which only the editor understands. To use an effect in a game or on a website you have to export it into source code (currently C# or JavaScript) that simulates the effect frame by frame. Export happens through your neutrinoparticles.com account: the editor sends the effect to the site, the site exports it and sends the result back, and the editor writes the exported files to disk. The effect itself is never stored on the server.

Export settings

Each project has its own export settings, one set per target (for example JS or the various C# targets). They control where exported files are written and how the exported code is generated — for example the JavaScript module type, a capacity scale, whether textures are copied, and an optional post-export command. You edit them in the project's export settings dialog.

When an effect needs exporting

The editor tracks, per effect and per target, whether the exported file on disk is still up to date. An effect is flagged as needing export when:

  • the effect was changed in a way that affects the exported output;
  • it has never been exported for that target;
  • the exporter's settings that affect the output were changed — for example the capacity scale, the JavaScript module type, the textures option or the post-export command. Changing only the output folder does not flag the effect, because that does not change the generated code.

Effects exported by an older editor (before settings were tracked this way) are flagged for export once, the first time you open the project in a newer editor. Re-exporting them clears the flag.

Exporting from the project tree

Exportable effects, folders and the project root all show an Export button in the project tree when something below them still needs exporting:

  • On an effect, the button exports that effect.
  • On a folder (including the project root), the button exports everything that still needs export anywhere inside that folder, in one step.

Right-clicking an effect or a folder adds two actions:

  • Export — the same as the button: exports everything that needs export inside the selection. It is disabled when there is nothing to export.
  • Re-export — re-exports every effect inside the selection, whether or not it currently needs exporting. Use it when you want to regenerate all files, for example after changing a setting that you want applied everywhere.

Both menu actions work over a multi-selection: select several effects and/or folders and the action is applied to all of them at once.