Scripting API
Scripting API
UiView
Class in Abyss.Core, from Abyss.Core.
A UI document's class, which the build writes half of from the document: its elements by name, and a partial void for each thing each can do that the game's half fills in where it wants to hear it — partial void OnNewGameClicked() => StartGame();.
public abstract class UiViewRemarks
One is made for each document shown, as a game plays, and dropped as it goes. What the game's half writes runs between frames on the engine thread, where the world is its own: it may spawn, load and await, and an await it is in when the game stops never comes back, as a flow's.
A handler misspelt is a compile error: a partial void the build did not declare has nothing to implement. So is one whose element was renamed in the document.
Properties
World
public World World { get; }The world the document is shown in.
Exceptions
InvalidOperationException: The document is not shown yet.
Root
public ulong Root { get; private set; }The entity at the top of the document shown.
Owner
public ulong Owner { get; private set; }The entity that shows it: the one its UI Document is on.
IsShown
public bool IsShown { get; }Whether it is shown: attached to its elements, and not taken away since.
Methods
Remove
public bool Remove()Takes this template's instance away, its class told it is hidden, and every instance made in it with it. Whether it was one: a document a UI Document shows goes as its UI Document does.
