public static void SaveTo1x6PNG(this Cubemap cubemap, string path) { Texture2D texture2D = cubemap.Get1x6Texture2D(); texture2D.SaveToPNG(path); if (Application.isPlaying) { GameObject.Destroy(texture2D); } else { GameObject.DestroyImmediate(texture2D); } }