Unity more efficient find
Unity caches GameObjects based on their tags, so in a big scene with lots of objects,
GameObject.FindWithTag is several orders of magnitudes faster that GameObject.Find.
It still does not beat the simple deserialization of a direct public variable link (in terms of speed).
Just for the record: Object.FindObjectOfType is A LOT slower than GameObject.Find.
In our measurements, the relation is roughly: 10x GameObject.FindWithTag = GameObject.Find and 100x GameObject.Find = Object.FindObjectOfType.
Of course, all that only matters if it really matters. 99% of the cases, it just does not matter so if you don't write a tight Update() function in a big scene targeting iPhone 3, go on with any method you like until you run into trouble.
Unity more efficient find的更多相关文章
- 转一篇关于如何在Unity里使用Protobuf
原帖地址: http://purdyjotut.blogspot.com/2013/10/using-protobuf-in-unity3d.html 先转过来,等时间合适了,再来收拾 Using P ...
- [Unity+Android]横版扫描二维码
原地址:http://blog.csdn.net/dingxiaowei2013/article/details/25086835 终于解决了一个忧伤好久的问题,严重拖了项目进度,深感惭愧!一直被一系 ...
- UMA - Unity Multipurpose Avatar
UMA - Unity Multipurpose Avatar UMA version 1.0.1.0R Unity 4.3 What is UMA? UMA - Unity Multipurpose ...
- Unity NGUI和UGUI与模型、特效的层级关系
目录 1.介绍两大UI插件NGUI和UGUI 2.unity渲染顺序控制方式 3.NGUI的控制 4.UGUI的控制 5.模型深度的控制 6.粒子特效深度控制 7.NGUI与模型和粒子特效穿插层级管理 ...
- 【Unity Shaders】法线纹理(Normal Mapping)的实现细节
写在前面 写这篇的目的是为了总结我长期以来的混乱.虽然题目是"法线纹理的实现细节",但其实我想讲的是如何在shader中编程正确使用法线进行光照计算.这里面最让人头大的就是各种矩阵 ...
- Unity 5 Game Optimization (Chris Dickinson 著)
1. Detecting Performance Issues 2. Scripting Strategies 3. The Benefits of Batching 4. Kickstart You ...
- Unity 性能优化(力荐)
开始之前先分享几款性能优化的插件: 1.SimpleLOD : 除了同样拥有Mesh Baker所具有的Mesh合并.Atlas烘焙等功能,它还能提供Mesh的简化,并对动态蒙皮网格进行了很好的支持. ...
- Unity Glossary
https://docs.unity3d.com/2018.4/Documentation/Manual/Glossary.html 2D terms 2D Physics terms AI term ...
- Unity S老师系列课程学习
AssetBundle(创建打包)入门学习(基于Unity2017) (已看) 分组策略 逻辑实体分组 按照类型分组 按照使用分组 分组策略----总结 把经常更新的资源放在一个单独的包里面,跟不经常 ...
随机推荐
- (6)tcp-socket
(1)client端口: import socket# 产生一个socket对象sk = socket.socket()# 建立连接sk.connect( ("127.0.0.1" ...
- Oracle之数组
记忆力不好,提供样例套路: 固定长度数组: declare type t_test ) ); test t_test := t_test('a', 'b', 'c', 'd', 'e'); begin ...
- ansible如果兼容Centos5
基本安装 安装gcc,用于编译python源码 yum install gcc 更新python版本 centos自带python2.6版本,由于centos已对python深度依赖,所以更新pyth ...
- 《CoderXiaoban团队》第一次作业:团队亮相
实验五 这个作业属于哪个课程 软件工程任教教师 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p/10687492.html 团队名称 CoderXiao ...
- QMessageBox对话框
infoBox = QMessageBox() infoBox.setIcon(QMessageBox.Question) infoBox.setWindowTitle("初始化失败&quo ...
- zzw_非root用户安装python3.5
目的:不想改变linux 自带的python,只想要用特定的非root用户运行特定版本的python 1.进入非root用户 2.新建一个python3.5的安装目录 [a4_csbdc@bdc816 ...
- [luogu P2521] [HAOI2011]防线修建
[luogu P2521] [HAOI2011]防线修建 题目描述 近来A国和B国的矛盾激化,为了预防不测,A国准备修建一条长长的防线,当然修建防线的话,肯定要把需要保护的城市修在防线内部了.可是A国 ...
- httpd-2.4基本使用及lamp基础(01)
Centos 6 默认安装http版本为2.2,如果想安装2.4版本则需要升级apr centos6默认:apr-1.3.9,apr-util-1.3.9 编译安装步骤: 1.4+版的apr和apr- ...
- JavaScript热身练习1
把某个元素移出你的视线: 1.display:none:(显示为无,不占地) 2.visibility:hidden:(隐藏,占地) 3.宽或者高设置为零 4.透明度设置 5.left/top (定位 ...
- 软件151 王楚博 JavaEE的配置
一.准备以下压缩包 1.JDK1.7 文件:jdk1.7.rar 2. eclipse-jee-mars-2 文件:32位系统准备eclipse-jee-mars-2-win32.zip,64位系统准 ...