Entities.ForEach当前支持哪些功能,用于SystemBase中可用的各种调度方法:
支持的功能 | Run | Schedule | ScheduleParallel |
---|---|---|---|
捕获本地“值类型” value type | x | x | x |
捕获本地参考类型reference type | x (only WithoutBurst) | ||
写入捕获的变量 variables | x | ||
系统类上的字段 | x (only WithoutBurst) | ||
参数类型的方法 | x (only WithoutBurst) | ||
共享组件 | x (only WithoutBurst) | ||
托管组件 | x (only WithoutBurst) | ||
结构变化 | x (only WithoutBurst and WithStructuralChanges) | ||
SystemBase.GetComponent | x | x | x |
SystemBase.SetComponent | x | x | |
GetComponentDataFromEntity | x | x | x (only as ReadOnly) |
HasComponent | x | x | x |
WithDisposeOnCompletion | x | x | x |
不支持的功能:
- Dynamic code in .With invocations:
带调用的动态代码 - SharedComponent parameters by ref:
ref的SharedComponent参数 - Nested Entities.ForEach lambda expressions:
每个Lambda表达式嵌套实体 - Entities.ForEach in systems marked with [ExecuteAlways] (currently being fixed):
标记为[ExecuteAlways]的系统中的Entities.ForEach(当前已修复) - Calling with delegate stored in variable, field or by method:
使用存储在变量,字段或方法中的委托进行调用 - SetComponent with lambda parameter type:
具有lambda参数类型的SetComponent - GetComponent with writable lambda parameter:
具有可写lambda参数的GetComponent - Generic parameters in lambdas:
Lambdas中的通用参数 - In systems with generic parameters:
在具有通用参数的系统中
网友评论