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

百度做网站电话多少钱生物做实验的网站

百度做网站电话多少钱,生物做实验的网站,网站推广只能使用在线手段进行,建立网站纯文字版本ECS是一种软件架构模式#xff0c;就像MVC一样。ECS最早在游戏《守望先锋》中提及到的相关链接。ECS具体是指实体#xff08;entity#xff09;、 组件#xff08;component#xff09;和系统#xff08;system#xff09;#xff1a; 实体#xff1a;实体是一个ID就像MVC一样。ECS最早在游戏《守望先锋》中提及到的相关链接。ECS具体是指实体entity、 组件component和系统system 实体实体是一个ID它是一个唯一的标识符用于标识一个对象它本身不包含任何数据只是一个ID它的作用是用于标识一个对象它的数据是由组件来提供的。 组件组件是一个数据结构它包含了一些数据用于描述一个对象的属性组件是没有任何行为的它只是一个数据结构。 系统主要用户逻辑处理进行状态迁移。系统中不保留数据且是无状态的。 三者之间的关系如下图所示 ECS在unity中出现的原因 在使用unity开发的时候monobehaviour是我们最常用的然而monobehaviour中的update是基于gameobject去更新的且无序的这样很容易造成memory cache miss。而ECS是基于数据的它将具有相同Component组合的Entity放在一起这样可以更好的利用cache提高性能。 archetype 通过上面的图和介绍我们知道通过将不同的Component组合和Entity一起组成了GameOjbectComponent不同组合的唯一性在ECS中被称为archetype。在ECS中archetype是一个很重要的概念它是用来管理内存的每个archetype都有一个chunk列表chunk是一种内存管理方式。 上图中EntityA和EntityB具有相同的Component组合所以它们属于同一个Archetype M而EntityC具有不同的Component组合所以它们属于不同的Archetype N。 下图是一个chunk的内存排布 component在chunk中的排布. #mermaid-svg-dOLGdj5zBc8nNxlZ {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-dOLGdj5zBc8nNxlZ .error-icon{fill:#552222;}#mermaid-svg-dOLGdj5zBc8nNxlZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-dOLGdj5zBc8nNxlZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-dOLGdj5zBc8nNxlZ .marker.cross{stroke:#333333;}#mermaid-svg-dOLGdj5zBc8nNxlZ svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup text{fill:#9370DB;fill:#131300;stroke:none;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:10px;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup text .title{font-weight:bolder;}#mermaid-svg-dOLGdj5zBc8nNxlZ .nodeLabel,#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel{color:#131300;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel .label rect{fill:#ECECFF;}#mermaid-svg-dOLGdj5zBc8nNxlZ .label text{fill:#131300;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel .label span{background:#ECECFF;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classTitle{font-weight:bolder;}#mermaid-svg-dOLGdj5zBc8nNxlZ .node rect,#mermaid-svg-dOLGdj5zBc8nNxlZ .node circle,#mermaid-svg-dOLGdj5zBc8nNxlZ .node ellipse,#mermaid-svg-dOLGdj5zBc8nNxlZ .node polygon,#mermaid-svg-dOLGdj5zBc8nNxlZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .divider{stroke:#9370DB;stroke:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.clickable{cursor:pointer;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup line{stroke:#9370DB;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classLabel .label{fill:#9370DB;font-size:10px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .relation{stroke:#333333;stroke-width:1;fill:none;}#mermaid-svg-dOLGdj5zBc8nNxlZ .dashed-line{stroke-dasharray:3;}#mermaid-svg-dOLGdj5zBc8nNxlZ #compositionStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #compositionEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #dependencyStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #dependencyStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #extensionStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .extension{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #extensionEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .extension{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #aggregationStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #aggregationEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeTerminals{font-size:11px;}#mermaid-svg-dOLGdj5zBc8nNxlZ :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Archetype ArchetypeChunkData Chunks; ComponentTypeInArchetype* Types; ArchetypeChunkData Chunk** p; Chunk 执行System unity会自己实例化system,system里的方法默认都在主线程执行可以通过一下几种方式来实现多线程 Entities.ForEachJob.WithCodeIJobEntityIJobEntityBatchC# Job System 各部分的创建 下面是一个简单的例子创建一个CustomSystem它会在每一帧中更新CustomData的值。ComponentData不一定要和MonoBehaviour一起使用它可以单独使用像一些CPU密集性的计算可以使用ComponentData来实现。下面的示例重点是为了说明各部分的创建过程从LaunchECS中可以发现仅仅使用了World中的EntityManager来创建了一个Entity系统的创建被注视掉了。这是因为unity会自己实例化system所以我们不需要手动创建system。 public class Custom : MonoBehaviour {private void Awake(){LaunchECS();}private void LaunchECS(){var world World.DefaultGameObjectInjectionWorld;world.EntityManager.CreateEntity(typeof(CustomData));// world.CreateSystemCustomSystem();} }public struct CustomData : IComponentData {public int Value; }public partial class CustomSystem : SystemBase {[BurstCompile]protected override void OnUpdate(){var timeElapsedTime World.Time.ElapsedTime;Entities.ForEach((ref CustomData customData) {customData.Value (int)(100 * math.sin(timeElapsedTime));}).ScheduleParallel();} }游戏制作 ECS的大致情况我们已经了解了那如何在项目中应用呢。下面是一个简单的例子我们创建一个Cube然后通过ECS来控制它的移动。 将下面的代码放到名叫MoveMono的cs文件中然后在场景中添加一个sub scene在sub scene中添加一个Cube然后添加一个MoveMono组件并设置Velocity的值。 运行后我们会发现Cube会按照我们设置的Velocity的值进行移动。 [GenerateAuthoringComponent] public struct MoveData : IComponentData {public float3 Velocity; }public partial class MoveSystem : SystemBase {[BurstCompile]protected override void OnUpdate(){var deltaTime World.Time.DeltaTime;Entities.ForEach((ref Translation translation, in MoveData moveData) {translation.Value moveData.Velocity * deltaTime;}).ScheduleParallel();} }上面代码中使用了GenerateAuthoringComponent这个属性将会自动生成一个名为MoveMono的MonoBehaviour所有虽然我们并没有显示的创建MoveMono但是我们可以给GameObject添加组件是可以看到MoveMono. 除了GenerateAuthoringComponent属性以外还有其他方式去将ComponentData和MonoBehaviour关联起来还可以有其他方式。我们将在后面的gameplay文章中介绍。
http://www.w-s-a.com/news/283191/

相关文章:

  • 无锡网站制作需要多少钱北京二次感染最新消息
  • 网站开发视频播放无画面杭州房产信息网官网
  • 网站开发 改进如何创建公众号平台
  • wordpress网站响应很慢只有asp网站代码可以重新编译吗
  • 哪个网站教做饭做的好wordpress热点文章
  • 可以做推广东西的网站重庆网站建设 重庆网站制作
  • 珠海网站建设培训学校wordpress去版权 合法
  • 建设食品商购网站学校网站设计实验报告
  • 建个网站多少钱沭阳奥体小区做网站的
  • 广州视频网站建站公司php网页设计作业代码
  • 成都公司网站设计如何制作网址最简单的方法
  • 温州 做网站福建住房城乡建设部网站
  • 网站自动化采集成都网站设计费用
  • 广东专业网站定制建设淘宝网站的人员组织结构
  • 网站改版seo无锡有多少家公司
  • h5美食制作网站模板下载wordpress大学百度云
  • 零陵做网站建立网站的公司平台
  • 某企业电子商务网站建设网站开发实验结论
  • 自己做的网站突然打不开杭州哪些做网站公司好
  • 株洲专业建设网站免费cms内容管理系统
  • 网上建立网站赚钱网站建设方案书纯文字
  • 专业网站设计哪家好it外包合同模板
  • 个人网站备案都需要什么中小企业服务网
  • 佛山网站建设哪个在公司网站投简历该怎么做
  • 八戒网站做推广老域名全部失效请拿笔记好
  • iss服务器网站建设甘肃建设厅网站执业注册中心
  • 域名访问网站 过程网站 免费 托管运营
  • 下单的网站建设教程wordpress php7.1
  • 爱网站查询怎么做网站的图片跳转
  • 阿里云建站百度收录吗北京的设计公司排名