首先,我是 unity 和 airconsole 这两个平台的新手。
我只是在探索与 airconsole 集成的统一性,但我在导入“airconsole 插件”(从 Asset Store
导入)时遇到错误。
我在 Windows 10 上使用最新版本的 unity 2018.3.0f2 Personal
。
以下是我在统一控制台中看到的一些错误消息
Assets\AirConsole\plugins\Newtonsoft.Json\Utilities\DynamicWrapper.cs(27,20): error CS0246: The type or namespace name 'ModuleBuilder' could not be found (are you missing a using directive or an assembly reference?)
Assets\AirConsole\plugins\Newtonsoft.Json\Utilities\DynamicWrapper.cs(25,20): error CS0246: The type or namespace name 'ModuleBuilder' could not be found (are you missing a using directive or an assembly reference?)
Assets\AirConsole\plugins\Newtonsoft.Json\Utilities\DynamicReflectionDelegateFactory.cs(193,72): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)
Assets\AirConsole\plugins\Newtonsoft.Json\Utilities\DynamicReflectionDelegateFactory.cs(214,81): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)
...........
我如何解决问题并测试基本的空调示例。 提前致谢:)
最佳答案
无需更新 Newtonsoft.Json 库。相反,您只需在 Player Settings/WebGL Settings/Other Settings
中将 API Compatibility Level
设置为 .NET 4.x
。
要解决此错误,需要将平台(在build设置中)设置为 WebGL
,或者您还必须为当前选择的平台更改 API 兼容性级别 播放器设置
关于c# - Airconsole 和 Unity 集成问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54036708/