Rocher0724 / socket.io-unity

MIT License
107 stars 19 forks source link

ILGenerator Errors #8

Closed zombiestruck closed 3 years ago

zombiestruck commented 3 years ago
Assets\Plugins\Socket\Newtonsoft.Json\Utilities\DynamicReflectionDelegateFactory.cs(8,38): error CS0234: The type or namespace name 'Label' does not exist in the namespace 'System.Reflection.Emit' (are you missing an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(7,42): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(15,47): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(21,41): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(28,43): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(35,40): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Socket\Newtonsoft.Json\Utilities\ILGeneratorExtensions.cs(42,36): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)
Megamil commented 3 years ago

This happens because by default Unity Player, in Project Settings, is set to Api Compatibility level 2.x. Change it to .Net 4.x and It will work. The path is Edit->Project Settings->Player->Api Compatibility Level. ... https://answers.unity.com/questions/1624627/issue-with-powerui-and-20183.html