Fork me on GitHub

Class WriteGroupAttribute

[WriteGroup]可以排除在创建已声明写入同一组件的查询时未知的组件。

这允许安全地扩展组件系统而无需编辑先前存在的系统。

目标是为期望将数据从一组组件(输入)转换为另一组(输出[s])的系统能够声明显式转换,并且它们专门知道一组输入。如果有其他输入要写入同一输出,则查询不应该匹配,因为它是一个无意义/未处理的设置。它既可以防止无意义的组​​件(两个系统写入相同的输出值),也可以通过在实体上放置具有相同写锁定的组件来“关闭”现有系统/查询,让另一个系统处理它。

Inheritance

System.Object

System.Attribute

WriteGroupAttribute

Namespace: Unity.Entities
Syntax
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
public class WriteGroupAttribute : Attribute, _Attribute
Constructors
WriteGroupAttribute(Type)
Declaration
public WriteGroupAttribute(Type targetType)
Fields
TargetType
Declaration
public Type TargetType
posted @ 2019-08-09 16:22  gamedev'  阅读(246)  评论(0编辑  收藏  举报