源码分享 收藏本版 已有3人收藏 +发表新主题
查看: 20083|回复: 0
打印 上一主题 下一主题

[分享] ean Pool v1.0.3 (Dec 11, 2015) 对象池

[复制链接]

[分享] ean Pool v1.0.3 (Dec 11, 2015) 对象池

yanjianghao 发表于 2016-4-24 23:06:38 浏览:  20083 回复:  0 只看该作者 复制链接




Pooling is where you recycle unused GameObjects instead of constantly using Instantiate and Destroy.
  
To use it, all you have to do is replace your Instantiate calls with Lean.LeanPool.Spawn calls, and your Destroy calls with Lean.LeanPool.Despawn calls, and it will work like magic.
  
Lean Pool also comes with more advanced settings, such as the ability
to preload a certain amount of prefab clones, the ability to specify a
maximum amount of prefab clones that can be spawned, and the method used
to notify prefab clones about their pooling.
  
Lean Pool is designed to work with both GameObjects and Components,
and allows you to easily add support for custom pool handling, e.g.
resetting a Rigidbody's velocity (this script comes included).
脚本下载:
游客,如果您要查看本帖隐藏内容请回复
分享至:
| 人收藏
回复

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright © 2013-2017 ARinChina-增强现实中国技术论坛   All Rights Reserved.