NodeWorld

IFluxWorldRuntime

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public interface IFluxWorldRuntime

Namespace NodeWorld.SDK.Client.Flux.

The FL# scripts of the loaded world, run in the client or in Play mode of a world project.

Properties

HasLoadedWorld

csharp
bool HasLoadedWorld { get; }

A world's scripts are loaded and running.

Methods

LoadWorld

csharp
void LoadWorld(string worldId, byte[] aotModule, Scene scene, IReadOnlyCollection<GameObject> worldRoots)

Starts the scripts of the world: one per FluxBehaviour under its roots (active ones). worldRoots: the roots of the scene as the world's bundle made them (Scene.GetRootGameObjects once it is loaded, before it becomes active: anything instantiated afterwards lands in the active scene), the only objects of the scene the scripts may touch with the ones they make; what the client adds to the active scene later (avatars, portals, cameras, voices) stays the client's.

UnloadWorld

csharp
void UnloadWorld()

Stops the world's scripts, every thread with them, and frees what they made.

Events

ScriptsInterrupted

csharp
event Action<int> ScriptsInterrupted

The watchdog stopped the world's scripts (a call ran longer than its timeout, given in seconds: the loading one, then 10 s): the world stays shown, the client tells the player.