Skip to documentation
LITHIUM
Guide 07

Move a v0 addon to Lithium v1.

Upgrade a pre-1.0 Lithium addon to the current lifecycle, configuration and service contracts.

Before upgrading

Pin the v0 revision used by your project, commit the current addon configuration and cover load and unload behavior with a focused test. Upgrade one addon package at a time.

Review addon lifecycle assumptions

v1 makes successful load state and teardown behavior explicit. Keep resource creation in OnAddonLoaded, release partially-created resources in OnAddonUnloaded and do not assume that a failed load skips teardown.

Move settings into typed configuration

Derive an addon-specific record from AddonConfig, change the addon base class to Addon<TConfig> and read settings through Config. Call SaveConfig after changing persistent values.

Validate scene services

Keep shared runtime systems as public concrete ComponentService types so v1 can mount them into the active scene. Verify the service is scene-owned before relying on Component lifecycle callbacks.

Check experimental events separately

The named event API is experimental in v1. Migrate lifecycle and configuration first, then add event integration behind focused contract tests.

Cette page vous a-t-elle aidé ?

N’indiquez aucune donnée personnelle dans votre commentaire.

0/1000