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. Logs go to BepInEx\logs\obenseuer.moddingframework.surveillance.log.
Everything not listed in this reference is internal and may change without notice. Items marked experimental may change too.
When you can call it
- Call everything from your mod’s normal code, not from a background thread you started. The game only runs safely on the main thread (see the glossary). This goes for the code that handles the events too.
- It is safe to call any of it at any time, even on the main menu, while loading, or with no save loaded. Reads give a plain default:
falseor an empty list.SetCameraActivegivesfalsewhen no camera has the id, and while a save is loading or saving. - Your event handlers run inside the game’s own call. If one throws an error, the framework logs it and still runs the other handlers.
If something fails to set up
The framework changes some of the game’s methods when it starts, so it can tell your mod about sightings and trespassing. If a game update breaks one of them, only that part turns off, and the framework writes error lines and a warning to the log. The rest of the framework keeps working. This page has two feature groups.
PlayerSpotteduses the feature groupobenseuer.moddingframework.surveillance.witness, andTrespassEnteredandTrespassLeftuseobenseuer.moddingframework.surveillance.trespass. If a change is missing, only that group is turned off and only its events stop. The other group and all the reads keep working.IsAvailableisfalsewhile any group is missing. (The changed methods areWitness.Witnessed(witness group) andTrespassingArea.OnTriggerStayandOnTriggerExit(trespass group).)