我正在尝试将GraphQL应用到Unity3D(版本2017.1.0f3 Personal)中。我正在使用.NET 4.6(实验性),但是尽管如此,Unity不支持dynamic关键字。这很奇怪,因为在.NET 4.0中,它是.NET的一部分。除了在Unity中。我正在搜索解决方案以使其工作,但没有动态关键字的解决方案。错误如下:
Severity Code Description Project File Line Suppression State
Error CS1980 Cannot define a class or member that utilizes 'dynamic'
because the compiler required type
'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you
missing a reference? skiing-prototype (1) D:\skiing-prototype
(1)\Assets\Scripts\GraphQL.cs 62 Active
这是使用GraphQL C#客户端唯一的附带条件。有人尝试过让它工作吗?我还没有找到任何更大的努力来使其运行起来。 编辑: 我正在使用这个客户端:https://github.com/bkniffler/graphql-net-client 此外,这是Visual Studio的一个错误,但在Unity控制台中也显示错误,稍后会更新具体内容。
Assets/Scripts/GraphQL.cs(80,16): error CS1980: Dynamic keyword requires
`System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you
missing System.Core.dll assembly reference?
这是Unity编辑器的错误,似乎与Visual Studio中的相同。