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

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.

主站蜘蛛池模板: 宁安市| 尼木县| 沙湾县| 观塘区| 双桥区| 石楼县| 永昌县| 宜春市| 交口县| 宜章县| 清河县| 姚安县| 昌图县| 建水县| 灯塔市| 龙里县| 永安市| 故城县| 阳江市| 定兴县| 寻乌县| 雅安市| 河北省| 富阳市| 卢氏县| 陆河县| 枣庄市| 搜索| 武清区| 丰宁| 隆化县| 门头沟区| 中宁县| 隆尧县| 浪卡子县| 南阳市| 巢湖市| 佛山市| 海南省| 资溪县| 临沭县|