EditorAwareApp

interface EditorAwareApp

Functions

Link copied to clipboard
open fun launchStandalone(ctx: KoolContext)
Link copied to clipboard
abstract suspend fun loadApp(projectModel: EditorProject, ctx: KoolContext)

Called on app initialization - either invoked by the KoolEditor when the app was (re-)loaded or by the Launcher when the app was started in standalone mode. The two modes can be distinguished via AppState.isInEditor

Link copied to clipboard
open fun onDispose(ctx: KoolContext)

Called on app shutdown - either because the app reloaded and the old version is about to be discarded or the application is about to close.

Link copied to clipboard
open fun startApp(projectModel: EditorProject, ctx: KoolContext)

Called after the app is loaded and starts the app execution. This function is either called directly after loadApp in case the app runs in standalone mode or when the user enables play mode in the editor. The two modes can be distinguished via AppState.isInEditor