【发布时间】:2023-08-11 20:12:02
【问题描述】:
我正在尝试在 Xamarin Studio 4.0.10 (build 5) 中使用 MonoGame 创建一个简单的程序。
但是当我尝试使用Content.Load 方法加载一些纹理时,我收到一个异常System.MissingMethodException 并带有一条消息
Method not found: 'MonoMac.AppKit.NSImage.AsCGImage'.
我使用的实际代码行是:
protected override void LoadContent()
{
//some stuff here
Texture2D freezeTexts = new Texture2D[5];
for (int i = 0; i < 5; i++) {
freezeTexts[i] = Content.Load<Texture2D>("freeze"+i); // exception here
}
//some other stuff here
}
我进行了一些谷歌搜索,发现这是由于一些 API 更改而发生的,而 Xamarin Studio 尚未实现(至少这是我所理解的)。所以我的问题是:我该如何解决这个问题?
【问题讨论】:
标签: c# macos mono monogame xamarin-studio