Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Attribute · Ara

CommandAttribute

Declares a gameplay command: a static partial class with public static CommandResult Execute(ref CommandContext ctx, Entity target, ref C component, ...). Plain parameters become the params type agents and tools call it with; ref/in component parameters bind to the target entity's components. Commands are synchronous and capture no managed state, so they are prediction- and undo-safe.

public sealed class CommandAttribute : Attribute

Constructors

CommandAttribute

public CommandAttribute(string name = null);

Declares a gameplay command: a static partial class with public static CommandResult Execute(ref CommandContext ctx, Entity target, ref C component, ...). Plain parameters become the params type agents and tools call it with; ref/in component parameters bind to the target entity's components. Commands are synchronous and capture no managed state, so they are prediction- and undo-safe.

Properties

Name

public string Name { get; }

Stable command name (game.UseMedkit); defaults to the class name.