Details
Target: Obenseuer 0.5.08 (buildid 25969064), Unity 6000.0.77f1 Mono, BepInEx 6 Unity.Mono (be.788, the tested build) or BepInEx 5 (5.4.23 or later). Namespace: ObenseuerCore. Source: src/Api/WorldSky.cs, src/Api/WorldSkyPatches.cs, src/Api/SkyApply.cs and src/Api/SkyChannel.cs.
Everything not listed in this reference is internal and may change without notice.
- The framework changes some of the game’s methods when it starts, so it can write your sky values at the right moment.
- This page calls that set of changes a feature group. Its feature group is
obenseuer.moddingframework.sky, the name you will see in the log.
When you can call it
- Call everything from your mod’s normal code (
OnLoad, event handlers,Update), not from a background thread you started. The game only runs safely on the main thread (see the glossary). WorldSky.IsAvailabletells you whether your values will be applied. It isfalsewhen the framework could not set up the sky changes, or when the feature group was turned off. ThenSetreturnsfalse.
If something fails to set up
The framework changes some of the game’s methods when it starts. If a game update breaks one of them, the framework turns off the feature group that depends on it, and writes error lines to the group’s log file in BepInEx\logs. The rest of the framework keeps working.
- If any of the changes fails, the feature group turns off and
WorldSky.IsAvailablebecomesfalse.Currentcan still be read. (the framework patchesAzureSkyRenderController.UpdateShaderUniforms()with a prefix, and each game writer with a prefix and a finalizer (the methods listed above). It subscribes toApplication.onBeforeRenderonly while an override is set or a value is still held.)