Scripting API

Scripting API

AbyssPackageAttribute

Class in Abyss.Core, from Abyss.Core.

Says an assembly is a package's, and what registers it: what the engine's source generator writes into a package's code, beside its AbyssPackage, and reads off each package a game references, to call every package's registration from the game's own.

public sealed class AbyssPackageAttribute : Attribute

Remarks

What it needs is said here rather than read off what the assembly references, since a game is compiled against its packages' reference assemblies, which reference only what their public surface names.

Constructors

AbyssPackageAttribute

public AbyssPackageAttribute(string id, Type registrar, params string[] needs)

Says an assembly is a package's, and what registers it: what the engine's source generator writes into a package's code, beside its AbyssPackage, and reads off each package a game references, to call every package's registration from the game's own.

Parameters

  • id: The package's id.
  • registrar: Its AbyssPackage: a static class whose Register(World) registers what it declares.
  • needs: The ids of the packages it needs, which are registered and played before it.

What it needs is said here rather than read off what the assembly references, since a game is compiled against its packages' reference assemblies, which reference only what their public surface names.

Properties

Id

public string Id { get; }

The package's id.

Registrar

public Type Registrar { get; }

Its AbyssPackage, whose Register(World) registers its components, its events and its UI documents' classes.

Needs

public IReadOnlyList<string> Needs { get; }

The ids of the packages it needs.