标签:get one start nbsp ati callback rem call ring
2. Scripting Strategies
2.1 Cache Component references (缓存组件引用)
使用 Rigidbody rigidbody = GetComponent<Rigidbody> 代替 GetComponent<Rigidbody> 可以减少CPU开销
2.2 Obtaining Components using the fastest method (使用最快的方法获取组件)
GetComponent(string),GetComponent<ComponentName>,GetComponent(typeof(ComponentName))
尽量使用GetComponent<ComponentName>
2.3 Removing empty callback declarations(移除空的回调声明)
如果不需要执行功能,去掉默认的Start(),Update()等等函数
标签:get one start nbsp ati callback rem call ring
原文地址:http://www.cnblogs.com/revoid/p/6194346.html