官术网_书友最值得收藏!

Scripting Strategies

Since scripting will consume a great deal of our development time, it will be enormously beneficial to learn some best practices. Scripting is a very broad term, so we will try to limit our exposure in this chapter to situations that are very Unity specific, focusing on problems surrounding MonoBehaviours, GameObjects, and related functionality.

We will discuss the nuances and advanced topics of the C# language, .NET library, and Mono Framework in Chapter 8, Masterful Memory Management.

In this chapter, we will explore ways of applying performance enhancements to the following areas:

  • Accessing Components
  • Component callbacks (Update(), Awake(), and so on)
  • Coroutines
  • GameObject and Transform usage
  • Interobject communication
  • Mathematical calculations
  • Deserialization such as Scene and Prefab loading

Whether you have some specific problems in mind that you wish to solve or you just want to learn some techniques for future reference, this chapter will introduce you to a wide array of methods that you can use to improve your scripting efforts now and in the future. In each case, we will explore how and why the performance issue arises, an example situation in which the problem is occurring, and one or more solutions to combat the issue.

主站蜘蛛池模板: 宣恩县| 旅游| 德清县| 开鲁县| 大埔区| 同德县| 宁明县| 南平市| 新巴尔虎左旗| 新沂市| 博乐市| 岚皋县| 凤山县| 新密市| 庆安县| 榆林市| 灌云县| 岢岚县| 秦皇岛市| 探索| 钟山县| 斗六市| 安阳县| 乌苏市| 东山县| 岑巩县| 济南市| 衡阳市| 石渠县| 天气| 太谷县| 霍山县| 方正县| 铜梁县| 深泽县| 焦作市| 惠州市| 祁东县| 高青县| 萝北县| 昌黎县|