Mac 上使用 MonoGame 的 XNA 游戏
XNA Game with MonoGame on Mac
我刚刚转到 mac,我正在使用 monogame 继续我的 XNA 开发。
然而,当我尝试使用 Gamepad.GetState(index)
时,它抛出了以下错误。
System.IO.FileNotFoundException: Could not load file or assembly 'Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e' or one of its dependencies.
at at Microsoft.Xna.Framework.Input.GamePad.GetState (Microsoft.Xna.Framework.PlayerIndex)
at MultiverseRPG.InputHandler..ctor (Microsoft.Xna.Framework.Game) [0x00063] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/xna/InputHandler.cs:94
at MultiverseRPG.Game1..ctor () [0x00068] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Game1.cs:62
at MultiverseRPG.AppDelegate.FinishedLaunching (MonoMac.Foundation.NSObject) [0x00002] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Main.cs:35
at at (wrapper dynamic-method) object.[MultiverseRPG.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject)
at at (wrapper native-to-managed) object.[MultiverseRPG.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject)
at at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00012>
at at MonoMac.AppKit.NSApplication.Main (string[])
at MultiverseRPG.Program.Main (string[]) [0x0001d] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Main.cs:22
我已通过将 Tao.sdl.dll 文件添加到项目并为项目添加 .net 引用来解决此问题。
感谢帮助
我刚刚转到 mac,我正在使用 monogame 继续我的 XNA 开发。
然而,当我尝试使用 Gamepad.GetState(index)
时,它抛出了以下错误。
System.IO.FileNotFoundException: Could not load file or assembly 'Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e' or one of its dependencies. at at Microsoft.Xna.Framework.Input.GamePad.GetState (Microsoft.Xna.Framework.PlayerIndex) at MultiverseRPG.InputHandler..ctor (Microsoft.Xna.Framework.Game) [0x00063] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/xna/InputHandler.cs:94 at MultiverseRPG.Game1..ctor () [0x00068] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Game1.cs:62 at MultiverseRPG.AppDelegate.FinishedLaunching (MonoMac.Foundation.NSObject) [0x00002] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Main.cs:35 at at (wrapper dynamic-method) object.[MultiverseRPG.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) at at (wrapper native-to-managed) object.[MultiverseRPG.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) at at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00012> at at MonoMac.AppKit.NSApplication.Main (string[]) at MultiverseRPG.Program.Main (string[]) [0x0001d] in /Users/aaron.wheeler/Projects/MultiverseRPG/MultiverseRPG/Main.cs:22
我已通过将 Tao.sdl.dll 文件添加到项目并为项目添加 .net 引用来解决此问题。
感谢帮助