SplitScript reference / Language / onAttach
onAttach
lifecycle block
onAttach { ... }
Initializes one attached process.
This action is implicitly suspending and owns process-lifetime cancellation for await and retry continuations. When the state declaration contains named layout declarations, it returns the generated layout variant that should be polled.
Examples
Use onAttach
onAttach {
let module = await process.module("GameAssembly.dll")
}
Related
| Symbol | Description |
|---|---|
| state | Declares process attachment and persistent watched state. |
| layout | Declares attachment-wide build dimensions or a named state memory shape. |
| await | Waits for an asynchronous value and yields its result. |
| retry | Retries synchronous fallible work until it succeeds. |
| onStateReady | Initializes one committed state snapshot. |