Class RequiresDataContainerAttribute
Declares that a ServerBehaviour requires a specific RuntimeDataContainer type. The container will be automatically instantiated and registered before the behaviour is initialized. Multiple systems can declare the same container type, and only one instance will be created.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class RequiresDataContainerAttribute : Attribute
- Inheritance
-
RequiresDataContainerAttribute
- Inherited Members
Constructors
RequiresDataContainerAttribute(Type)
Initializes a new instance of the RequiresDataContainerAttribute class.
public RequiresDataContainerAttribute(Type containerType)
Parameters
containerTypeTypeThe concrete RuntimeDataContainer type required by this behaviour.
Properties
ContainerType
The concrete RuntimeDataContainer type required by this behaviour. Must be a non-abstract class with a parameterless constructor.
public Type ContainerType { get; }
Property Value
InitializationPriority
Optional: Priority order for container initialization (lower = earlier). Defaults to 0. Use this when containers have dependencies on other containers. If multiple systems declare the same container with different priorities, the first encountered priority wins.
public int InitializationPriority { get; set; }