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) (已看) 分组策略 逻辑实体分组 按照类型分组 按照使用分组 分组策略----总结 把经常更新的资源放在一个单独的包里面,跟不经常 ...
随机推荐
- C++_day9am
dynamic_cast static_cast reinterpret_cast #include <iostream> using namespace std; class A{ pu ...
- 遗传算法(GA)
来自:https://blog.csdn.net/u010451580/article/details/51178225 遗传算法是模仿生物进化机制的随机全局搜索和优化方法.借鉴达尔文进化论和孟德尔的 ...
- 换工作之后需要兼容ie8的我
以下是我ie8踩得坑,总结了一下,以免以后会遇到,虽然有的度娘也能搜到但是偶尔看看自己的文章也能学到很多(后续如有添加继续补上) 1,ie8 input框建议不要使用line-height去撑高度,在 ...
- Activity与Fragment数据传递之Fragment从Activity获取数据
整理Fragment与Activity之间的数据交换,大体上包括三种: 1.Fragment从Activity获取数据 2.Activity从Fragment获取数据 3.Fragment之间获取数据 ...
- 在vue中调用echarts中的地图散点图~
首先!当然是在vue中引入echarts! 命令行 npm install echarts --save 在main.js文件中里引入 import echarts from 'ech ...
- maven war项目完整配置
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...
- Web前端开发标准规范
web前端开发规范的意义 提高团队的协作能力 提高代码的复用利用率 可以写出质量更高,效率更好的代码 为后期维护提供更好的支持 一.命名规则 命名使用英文语义化,禁止使用特殊字符,禁止使用拼音,禁止使 ...
- java知识随笔
Servlet: void init(ServletConfig var1) throws ServletException; ServletConfig getServletConfig(); vo ...
- CentOS 7 + MySql 中文乱码解决方案
原文:https://blog.csdn.net/qq_32953079/article/details/54629245,亲测有效,故记录之. 一.登录MySQL查看用SHOW VARIABLES ...
- linux上docker安装centos7.2
1.安装 docker pull centos:7.2.1511 2.启动镜像 docker run -d -i -t <IMAGE ID> /bin/bash 3.进入容器 docker ...