public class BitmapFontCreateCommand { void BuildTextureAtlas() { var textureAtlas = new Texture2D(1, 1, TextureFormat.ARGB32, false); //use textureAtlas UnityEngine.Object.DestroyImmediate(textureAtlas); // 您的代码中缺少纹理释放,这可能导致内存泄漏 } }