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) (已看) 分组策略 逻辑实体分组 按照类型分组 按照使用分组 分组策略----总结 把经常更新的资源放在一个单独的包里面,跟不经常 ...
随机推荐
- Kotlin 扩展
Kotlin 可以对一个类的属性和方法进行扩展,且不需要继承或使用 Decorator 模式. 扩展是一种静态行为,对被扩展的类代码本身不会造成任何影响. 扩展函数 扩展函数可以在已有类中添加新的方法 ...
- python ssh登录linux 上传和下载文件
#!usr/bin/python# coding: utf-8 import paramikoimport jsonremotedir='/tmp/log'remotefile = 'bst_mana ...
- ape 文件 转化为mp3 文件
试了很多软件,最后才发觉 any-audio-converter最好用. 可以吧ape 按 cue切割好,然后转化成 MP3 官网可以免费下载: https://www.any-audio-conve ...
- Phonics 自然拼读法 ai, oa,ie, ee,or,j Teacher:Lamb
课上内容(Lesson) 1. “L” 的介绍 Light L e.g. Love Like Life Dark L e.g. Apple world call 2. ...
- 用python算圆周率及进度条提示
(一)圆周率 : (1)圆周率是指平面上圆的周长与直径之比 (ratio of the circumference of a circle to the diameter) .用符号π表示.中国古代有 ...
- Django_URL
视图函数介绍 视图一般都写在app的views中,并且视图的第一个参数永远都是request(HttpRequest)对象.这个对象存储了请求过来的所有信息,包括携带的参数以及一些头部信息等.再视图中 ...
- bootstrap-editable实现bootstrap-table行内编辑
bootstrap-editable行内编辑效果如下: 需要引入插件 列初始化代码,为可编辑的列添加editable属性: columns = [ { title: '文件名', field: 'Na ...
- 笔记《JavaScript 权威指南》(第6版) 分条知识点概要3—表达式和运算符
[表达式和运算符]原始表达式,初始化表达式(对象和数组的),函数定义表达式,属性访问表达式,调用表达式,对象创建表达式,运算符概述,算术表达式,关系表达式,逻辑表达式,赋值表达式,表达式计算,其他运算 ...
- 【nowcoder】 4th T1 动态点分治
题目链接:https://www.nowcoder.com/acm/contest/175/A 题目名字吓死人 std: 我 太可啪了 一道简单的模拟题.虽然我把题意想错了. 按照题意模拟输出和继承. ...
- 学习创建spring boot
一.什么是spring boot? Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而使开 ...