using UnityEngine; using System.Collections; public class NPC : MonoBehaviour { //主摄像机对象 private Camera camera; //NPC名称 private string name = "我是雨松MOMO"; //主角对象 GameObject hero; //NPC模型高度 float npcHeight; //红色血条贴图 public Texture2D blood_red; //黑
本文是Unity官方教程,性能优化系列的第三篇<Optimizing garbage collection in Unity games>的翻译. 相关文章: Unity性能优化(1)-官方教程The Profiler window翻译 Unity性能优化(2)-官方教程Diagnosing performance problems using the Profiler window翻译 Unity性能优化(3)-官方教程Optimizing garbage collection in Uni