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

石家庄微信网站制作网站建设经营特色

石家庄微信网站制作,网站建设经营特色,安阳后营,哪个电商平台最好unity出了自己的对象池 这里记录一下用法 命名空间就是这个 一般有两种用法,第一种是在using里面获取,脱离这个域就释放。第二种是在Get和Release配合使用 // This version will only be returned to the pool if we call Release on it.//只有使用Re…

unity出了自己的对象池 这里记录一下用法

  • 命名空间就是这个
    在这里插入图片描述

  • 一般有两种用法,第一种是在using里面获取,脱离这个域就释放。第二种是在Get和Release配合使用

 // This version will only be returned to the pool if we call Release on it.//只有使用Release才会释放var simplifiedPoints = ListPool<Vector2>.Get();
//这种只要脱离了Scope就会自动释放// Copy the points into a temp list so we can pass them into the Simplify method// When the pooled object leaves the scope it will be Disposed and returned to the pool automatically.// This version is ideal for working with temporary lists.using (var pooledObject = ListPool<Vector2>.Get(out List<Vector2> tempList)){for (int i = 0; i < points.Length; ++i){tempList.Add(points[i]);}LineUtility.Simplify(tempList, 1.5f, simplifiedPoints);}return simplifiedPoints;
  • 一般比较常用的就几个集合类和下面这个,可以对自己的类进行一个池子回收。
using UnityEngine.Pool;public class GenericPoolExample
{class MyClass{public int someValue;public string someString;}void GetPooled(){// Get an instancevar instance = GenericPool<MyClass>.Get();// Return the instanceGenericPool<MyClass>.Release(instance);}
}
  • 对于一些unity中的GameObject对象可以使用ObjectPool
http://www.yayakq.cn/news/69673/

相关文章:

  • 深圳做棋牌网站建设哪家服务好银行网站建设方案视频
  • 山东seo网站网站流量被用完了
  • 网站转化微信小程序企业vi是什么
  • 做网站 参考文献网站建设公司做网站需要注意什么
  • 网站建设官方商城威海网站建设哪家的好
  • 微信如何绑定网站专业的网站开发团队
  • 0基础建站教程内网门户网站 建设方案
  • 博客做资讯类网站做瑜珈孕妇高清图网站
  • 东城区网站建设公司网页系统升级每天自动更新
  • 做白酒的网站注册一个平台需要多少钱
  • 和平网站建设优化seo我的世界做图片网站
  • 金华市建设技工学校教育培训网站wordpress邮件函数
  • 建设工程造价管理协会网站外贸网站的作用有哪些
  • 途牛旅行网站建设策划书网站建设凭证
  • 做内贸的电子商务网站典型有wordpress后台变慢
  • 做网站容易还是编程容易有哪些下载软件的应用
  • 微信微网站制作公司做网站数据库怎么整
  • 九江 网站建设做网站应该注意哪些方面
  • 济南专业网站建设哪家便宜.net网站吃内存
  • 网站非法篡改wordpress通栏图片插件
  • 金华app网站开发宜宾有什么大型网站建设公司
  • 个人兼职做建设网站湖南网站建设公司 干净磐石网络
  • 网站点击率多少正常wordpress 作者 英文版
  • 建站合同网站排名套餐
  • 那种类型的网站可以自己做也可以赚钱建网站张掖哪家强?
  • 两学一做网站专栏怎么设置wordpress 自定义分类 模板
  • 苏州网站建设报价单wordpress 3.8 漏洞
  • 百度怎样建立网站国学大师网站谁做的
  • 图书销售网站建设网站建设 业务员
  • 上海浦东网站建设公司佛山有哪些公司