Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SystemBundleService

[22:7] extends: EngineService

Wraps FXGL's SystemBundleService (com.almasb.fxgl.app.services.SystemBundleService), the engine service that owns the system-wide Bundle. The Bundle survives across scene reloads and is persisted to disk on engine exit, so it is the right place for cross-session settings the user wants to keep across game restarts (graphics options, last profile selection, last save slot, etc.). Obtain through fxgl.getService("com.almasb.fxgl.app.services.SystemBundleService") once the engine is running. The Bundle field is package-private in Kotlin, so use the getBundle / setBundle accessors here.

Methods

  • SystemBundleService ()

    Creates a fresh, unattached SystemBundleService.

  • adopt (object Ajo)

    Wraps an existing SystemBundleService AussomJavaObject.

  • getBundle ()

    Returns the system-wide Bundle wrapper. The bundle survives across scene reloads and is persisted on engine exit.

  • setBundle (object BundleObj)

    Replaces the system-wide Bundle. Accepts a Bundle wrapper or a raw Bundle AJO.