跳到主要内容
版本:Next

ReadyM.SDK.Attributes

Classes​

ArchetypeAttribute

Declares a struct as an archetype.

ArchetypeMixinAttribute

Declares a struct as an archetype mixin.

CreateHandlerAttribute

Runs this method on an entity right after it is created.

DeleteHandlerAttribute

Runs this method on an entity just before it is deleted.

ExtendsAttribute

Adds this mixin to every entity created as the named archetype.

IncludeArchetypeAttribute

Builds this archetype on another one, taking all of its fields. Including an archetype is inheritance, so there is one at most; combine data with IncludeAttribute and mixins instead.

IncludeAttribute

Include a mixin into this archetype. Only a mixin: to build on another archetype, use IncludeArchetypeAttribute.

IndexAttribute

Indexes the shape by this property, so an entity can be found by its value. One property per shape may carry it, and writing it keeps the index current.

ModConfigAttribute

Declares a class the SDK fills from a JSON file in the mod's own folder and registers as injectable.

ModEntryAttribute

Indicates the entry point of a mod. The annotated class may declare a private void Init() method, which will be called when the mod is loaded.

PropagatesAttribute

How this shape's values travel between the game and the ECS, and who may write them.

ReplicatedAttribute

Makes this mixin able to be replicated over the network, if included in a replicated archetype. Mixins without this attribute will not be replicated, even if the archetype is.

RpcContractsAttribute

Marks the class as containing RPC contracts. Each must be a public static partial void method with serializable parameters. Each must be annotated with one of the direction attributes:

  • ClientToServerAttribute
  • ServerToClientAttribute
  • ClientToClientsAttribute

RpcHandlersForAttribute

Binds a class to the [RpcContracts] set it implements.

ServiceAttribute

Declares a service class.

TagAttribute

Puts a tag on every entity created as this archetype.

UpdateOrderAttribute

Specifies when a service's update runs relative to the others.

Enums​

Delivery

How a replicated shape's changes reach the other side.

Propagation

Which way a shape's values may travel between the game and the ECS, and who may write them.