microsoft / LLMR

MIT License
58 stars 17 forks source link

TypeLoadException: Could not resolve type with token 0100000d from typeref (expected class 'UnityEngine.Input' in assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null') #13

Closed Jaskon863 closed 1 month ago

Jaskon863 commented 1 month ago

In playground_new scene, the Compiler's Assembly References is using Assets\RoslynCSharp\AssemblyReferences\UnityEngine.CoreModule.asset, when I try to input wasd to contorl a moving cube, it reports TypeLoadException: Could not resolve type with token 0100000d from typeref (expected class 'UnityEngine.Input' in assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null') Actually I don't understand why the Compiler Assembly References is different with the Roslyn/Settings. But when I change it to Assemblies\UnityEngine.CoreModule.dll, it causes another error This type has been forwarded to assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Consider adding a reference to that assembly.

Could you tell me how to solve that? Thanks in advance !

Jaskon863 commented 1 month ago

ok, I solve this problem by removing the Roslyn default UnityEngine.CoreModule in the playground_new scene's Compiler and add Assemblies\UnityEngine.CoreModule.dll, InputLegacyModule.dll in Roslyn/Settings.