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 : AttributeConstructors
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.