Skip to main content

ssgen_flutter 7.0.0-beta.1 copy "ssgen_flutter: ^7.0.0-beta.1" to clipboard
ssgen_flutter: ^7.0.0-beta.1 copied to clipboard

Live reload for SpriteStudio Player for Flutter: sswatch reconverts the projects you save in SpriteStudio and pushes them into the running app. A dev dependency.

ssgen_flutter #

Live-reload for SpriteStudio art: save a .sspj in your editor and watch the running app swap the animation in place — no r, no restart, no rebuild.

Dev tooling only. The host runner (sswatch) watches your sources, reconverts what went stale through ssgen_dart, and pushes the fresh pack into the running app over the VM Service, where ssplayer_flutter hands it to the player's reload. The app never imports this package, and the runtime stays converter-free: the receiving end comes up only in a debug build launched for it.

Install #

flutter pub add --dev ssgen_flutter

ssplayer_flutter, ssgen_dart, ssconverter_dart and ssruntime_dart come with it — see Installation.

Use #

There is nothing to add to the app. A player that loads its pack by asset key — every SpriteStudioAnimation, and SpriteStudioPlayer.loadAsset — takes the push by itself. Run the watcher — one tool, one mechanism; you only choose how the app is launched:

dart run ssgen_flutter:sswatch --run -d macos                # desktop
dart run ssgen_flutter:sswatch --run -d <emulator> --device  # device

Notes #

  • A device cannot convert on-device, so sswatch converts on the host and sends an embedded .ssab as bytes.
  • It is opt-in at build time. Apps gate on the SS_LIVE_RELOAD --dart-define (ssLiveReloadDefine); sswatch --run injects it, so a release build carries none of this.
  • The push channel is the VM Service (ext.ssgen.reload), which is why this works from an IDE debugger session as well as from --run.
  • On macOS desktop the debug build must run unsandboxed. The file push hands the app a host path outside its container, so with the default App Sandbox it reloads 0 players and reports no error. Set com.apple.security.app-sandbox to false in macos/Runner/DebugProfile.entitlements (debug only; Release keeps the sandbox), or add --device, whose bytes travel over the VM Service.
  • A player loaded from bytes has no asset key to be found by. Mix ssplayer_flutter's SsLiveReload into the State that owns it — which also lets a screen react to the reload.

More #

0
likes
150
points
62
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Live reload for SpriteStudio Player for Flutter: sswatch reconverts the projects you save in SpriteStudio and pushes them into the running app. A dev dependency.

Repository (GitHub)
View/report issues
Contributing

Topics

#spritestudio #hot-reload #developer-tools #cli #animation

License

BSD-3-Clause (license)

Dependencies

flutter, ssgen_dart, ssplayer_flutter, vm_service, watcher

More

Packages that depend on ssgen_flutter