当前位置: 首页 > news >正文

傻瓜使用模板建网站上海注册公司代理记账

傻瓜使用模板建网站,上海注册公司代理记账,深圳网站域名注册,idc服务器租赁ComponentSystem&#xff1a;仅支持主线程执行&#xff0c;不支持多线程&#xff0c;并且无法使用SystemBase介绍的扩展方法。 using Unity.Entities; using Unity.Transforms; using Unity.Mathematics;/// <summary> /// 仅主线程执行&#xff0c;不支持多线程 /// &l…

 ComponentSystem:仅支持主线程执行,不支持多线程,并且无法使用SystemBase介绍的扩展方法。

using Unity.Entities;
using Unity.Transforms;
using Unity.Mathematics;/// <summary>
/// 仅主线程执行,不支持多线程
/// </summary>
public class MyComponentSystem : ComponentSystem
{protected override void OnUpdate(){Entities.ForEach((ref Translation trans) =>{trans.Value = new float3(0, 1, 1);});//无法使用SystemBase的其他扩展功能}
}

JobComponentSystem:仅支持多线程,不支持主线程,可以使用扩展方法,并且重写的方法与其他都不同,它需要一个JobHandle返回值 

using Unity.Entities;
using Unity.Jobs;
using Unity.Transforms;
/// <summary>
/// 支持多线程 但不支持主线程执行
/// </summary>
public class MyJobComponentSystem : JobComponentSystem
{protected override JobHandle OnUpdate(JobHandle inputDeps){return Entities.ForEach((ref Translation trans) =>{trans.Value = new Unity.Mathematics.float3(0, 0, 1);}).WithName("MyName").Schedule(inputDeps);//可以使用SystemBase扩展方法}
}

具体文档:Using Entities.ForEach | Entities | 0.50.1-preview.2

如下图是三个执行筛选的方法限制,简单理解就是:
Run:非Burst编译下 可访问所有成员,可修改实体。【主线程执行】
Schedule:仅能获取局部成员,可修改实体。【新开一个后台线程执行】
ScheduleParallel:仅能获取局部成员,可以读取实体,但不能修改实体,并且可读数据只允许存储到WithReadOnly(xxx)方法标记的只读变量内。【多线程并行执行】

Supported FeatureRunScheduleScheduleParallel
Capture local value typexxx
Capture local reference typex (only WithoutBurst and not in ISystem)
Writing to captured variablesx
Use field on the system classx (only WithoutBurst)
Methods on reference typesx (only WithoutBurst and not in ISystem)
Shared Componentsx (only WithoutBurst and not in ISystem)
Managed Componentsx (only WithoutBurst and not in ISystem)
Structural changesx (only WithStructuralChanges and not in ISystem)
SystemBase.GetComponentxxx
SystemBase.SetComponentxx
GetComponentDataFromEntityxxx (only as ReadOnly)
HasComponentxxx
WithDisposeOnCompletionxxx
WithScheduleGranularityx
http://www.yayakq.cn/news/124570/

相关文章:

  • 网站建设标书模板创意网站展示
  • 制作网站费用怎么做分录专业深圳网站建设公司
  • 有哪些网站用vue做的人人建站
  • 温州企业建站系统南京好的网站制作公司
  • 自己做网站可以赚钱么jsp网站开发分享网站
  • 潍坊个人做网站wordpress文章奇偶循环
  • 限时抢购网站源码免费无网络游戏大全
  • aspcms园林绿化工程网站源码苏州网站开发建设
  • 做网站499常州网上挂号预约平台
  • 网站建设加盟模式网页免费建站
  • 网站ome系统怎么做网站搭建 成都
  • 外贸做网站建设哪家好苏州网站设计选哪家
  • 贷款网站模板一站式网站建设有哪些
  • 企业网站推广的形式有哪些网页设计实训报告的目的
  • 2017网站开发就业前景淮南做网站推广
  • 基于html5的购物商城网站医疗网站搭建
  • 包头网站 建设天津网站建设专家
  • 网站建立平台 cms设计方案网站
  • 网站的底部导航怎么做网站推广软件免费版大全
  • 淘宝网站网页设计说明对单位网站的要求吗
  • 徐州本地网站怎么做关于花的网站
  • 常州做网站要多少钱asp网站安装
  • 谷歌seo建站影业的网站怎么做
  • wordpress 子站wordpress采集中文
  • 红河网站制作长沙微网站建设公司
  • 工业和信息化部icp网站备案系统医院网站内链优化
  • 北京建设部网站官网有没有做问卷还能赚钱的网站
  • 电商网站运营流程官方网站如何做
  • 城乡建设网站职业查询怎么查网站到期时间查询
  • 网站开发主要框架 后端在godaddy做网站贵吗