Nebula
Loading...
Searching...
No Matches
NebulaEngine.AppEntry Class Reference

Static Public Member Functions

static int Main (IntPtr pluginPath, int pluginPathLength)
static void Exit ()
static int RequestReload (IntPtr pluginPath, int pluginPathLength)
static void OnBeginFrame ()
static void OnFrame ()
static void OnEndFrame ()
static int FlushEntityCreateQueue (IntPtr ids, int count)
 Called by the script feature unit at the beginning of the frame with the entities created since the last flush.
static int CollectGarbage (uint worldId)
 Called by the script feature unit after the game server has managed its entities, for every world whose entity count changed since the last sweep.
static int ClearWorld (uint worldId)
 Called by the script feature unit when a world is destroyed.
static int SerializeProperties (ulong entityId, IntPtr outBuffer, int maxLen)
 Called by the level format for every entity it writes.
static int ApplyProperties (ulong entityId, IntPtr jsonUtf8, int length)
 Called by the level format for every entity it reads.
static void DrawProperties (ulong entityId)
 The property section the inspector draws.
static int HasProperty (ulong entityId, IntPtr nameUtf8, int nameLen)
 Whether the entity has the property, which is what makes the editor's dropdown row read as already added.
static int DefaultPropertyJson (IntPtr nameUtf8, int nameLen, IntPtr outBuffer, int maxLen)
 The text a default instance of the property produces, which is what the editor's add writes.
static int SerializeKeys (ulong entityId, IntPtr keysUtf8, int keysLen, IntPtr outBuffer, int maxLen)
 The entity's text with only the keys it authored.
static int JsonKeys (IntPtr textUtf8, int length, IntPtr outBuffer, int maxLen)
 The keys one text carries, answered as newline separated paths.
static int MergeJson (IntPtr baseJsonUtf8, int baseLen, IntPtr overJsonUtf8, int overLen, IntPtr outBuffer, int maxLen)
 What one text gives when the keys another text carries are put over it.
static void SetRefContext (IntPtr pairsUtf8, int length)
 The file's guid map, as "guid:entityId" pairs, for the duration of the call that needs it.
static int ResolveJson (IntPtr baseJsonUtf8, int baseLen, IntPtr keysUtf8, int keysLen, IntPtr outBuffer, int maxLen)
 The text for the named keys, each value read from the base text, or the field's default when the base has nothing.

Static Package Functions

static void RequestManagedReload ()

Member Function Documentation

◆ ApplyProperties()

int NebulaEngine.AppEntry.ApplyProperties ( ulong entityId,
IntPtr jsonUtf8,
int length )
inlinestatic

Called by the level format for every entity it reads.

◆ ClearWorld()

int NebulaEngine.AppEntry.ClearWorld ( uint worldId)
inlinestatic

Called by the script feature unit when a world is destroyed.

◆ CollectGarbage()

int NebulaEngine.AppEntry.CollectGarbage ( uint worldId)
inlinestatic

Called by the script feature unit after the game server has managed its entities, for every world whose entity count changed since the last sweep.

◆ DefaultPropertyJson()

int NebulaEngine.AppEntry.DefaultPropertyJson ( IntPtr nameUtf8,
int nameLen,
IntPtr outBuffer,
int maxLen )
inlinestatic

The text a default instance of the property produces, which is what the editor's add writes.

◆ DrawProperties()

void NebulaEngine.AppEntry.DrawProperties ( ulong entityId)
inlinestatic

The property section the inspector draws.

Called from inside the editor's ImGui frame, through the editor's surface.

◆ Exit()

void NebulaEngine.AppEntry.Exit ( )
inlinestatic

◆ FlushEntityCreateQueue()

int NebulaEngine.AppEntry.FlushEntityCreateQueue ( IntPtr ids,
int count )
inlinestatic

Called by the script feature unit at the beginning of the frame with the entities created since the last flush.

The buffer is a blittable array of entity ids and is only valid for the duration of the call, so the mirror has to be populated here.

◆ HasProperty()

int NebulaEngine.AppEntry.HasProperty ( ulong entityId,
IntPtr nameUtf8,
int nameLen )
inlinestatic

Whether the entity has the property, which is what makes the editor's dropdown row read as already added.

◆ JsonKeys()

int NebulaEngine.AppEntry.JsonKeys ( IntPtr textUtf8,
int length,
IntPtr outBuffer,
int maxLen )
inlinestatic

The keys one text carries, answered as newline separated paths.

This is what lets the level format know which part of an entity's text it authored, without reading it.

◆ Main()

int NebulaEngine.AppEntry.Main ( IntPtr pluginPath,
int pluginPathLength )
inlinestatic

◆ MergeJson()

int NebulaEngine.AppEntry.MergeJson ( IntPtr baseJsonUtf8,
int baseLen,
IntPtr overJsonUtf8,
int overLen,
IntPtr outBuffer,
int maxLen )
inlinestatic

What one text gives when the keys another text carries are put over it.

◆ OnBeginFrame()

void NebulaEngine.AppEntry.OnBeginFrame ( )
inlinestatic

◆ OnEndFrame()

void NebulaEngine.AppEntry.OnEndFrame ( )
inlinestatic

◆ OnFrame()

void NebulaEngine.AppEntry.OnFrame ( )
inlinestatic

◆ RequestManagedReload()

void NebulaEngine.AppEntry.RequestManagedReload ( )
inlinestaticpackage

◆ RequestReload()

int NebulaEngine.AppEntry.RequestReload ( IntPtr pluginPath,
int pluginPathLength )
inlinestatic

◆ ResolveJson()

int NebulaEngine.AppEntry.ResolveJson ( IntPtr baseJsonUtf8,
int baseLen,
IntPtr keysUtf8,
int keysLen,
IntPtr outBuffer,
int maxLen )
inlinestatic

The text for the named keys, each value read from the base text, or the field's default when the base has nothing.

This is what a revert to the prefab writes.

◆ SerializeKeys()

int NebulaEngine.AppEntry.SerializeKeys ( ulong entityId,
IntPtr keysUtf8,
int keysLen,
IntPtr outBuffer,
int maxLen )
inlinestatic

The entity's text with only the keys it authored.

The keys are newline separated paths, because the level format holds them as strings and cannot see inside the text it is writing.

◆ SerializeProperties()

int NebulaEngine.AppEntry.SerializeProperties ( ulong entityId,
IntPtr outBuffer,
int maxLen )
inlinestatic

Called by the level format for every entity it writes.

The json is written into a buffer the native side owns, and the length needed is answered when that buffer was too small.

◆ SetRefContext()

void NebulaEngine.AppEntry.SetRefContext ( IntPtr pairsUtf8,
int length )
inlinestatic

The file's guid map, as "guid:entityId" pairs, for the duration of the call that needs it.


The documentation for this class was generated from the following file:
  • /github/workspace/code/addons/nsharp/NebulaEngine/Main.cs