美文网首页
Entities.ForEach支持哪些功能,SystemBas

Entities.ForEach支持哪些功能,SystemBas

作者: Leo0543 | 来源:发表于2021-03-23 12:54 被阅读0次

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

不支持的功能:

  1. Dynamic code in .With invocations:
    带调用的动态代码
  2. SharedComponent parameters by ref:
    ref的SharedComponent参数
  3. Nested Entities.ForEach lambda expressions:
    每个Lambda表达式嵌套实体
  4. Entities.ForEach in systems marked with [ExecuteAlways] (currently being fixed):
    标记为[ExecuteAlways]的系统中的Entities.ForEach(当前已修复)
  5. Calling with delegate stored in variable, field or by method:
    使用存储在变量,字段或方法中的委托进行调用
  6. SetComponent with lambda parameter type:
    具有lambda参数类型的SetComponent
  7. GetComponent with writable lambda parameter:
    具有可写lambda参数的GetComponent
  8. Generic parameters in lambdas:
    Lambdas中的通用参数
  9. In systems with generic parameters:
    在具有通用参数的系统中

相关文章

网友评论

      本文标题:Entities.ForEach支持哪些功能,SystemBas

      本文链接:https://www.haomeiwen.com/subject/zscfhltx.html