Exception is being thrown in external library in unity, but does not occur in when developing the library
I have been developing a game in unity when I ran to this problem.
The situation is like this: I have developed a separated library, which handles custom creation of items and such, also the library interacts with JSON files .Hence it depends on JSON.net. Now I have build it for .NET 3.5, and added it into my unity assets I tested the library and it worked fine.
Than I tried to run the creation of items from unity but this exception is being thrown:
ArgumentException: Could not cast or convert from System.String to Item_Generator.Quality'.
Create a TypeConverter to convert from the string to the key type object.
Path 'Restricted', line 2, position 17.
This is an error that I have been familiar with, and I did implement a TypeConverter
like the error required .
This error only occurs when I run it from unity, when I run my library from visual studio it works fine. I even created a new project and used the raw dlls, used the same code, and it works fine.
Does anyone know why is it doing it? My library is set for .NET 3.5 and using JSON.net for the JSON files - also for .NET 3.5
Your answer
Follow this Question
Related Questions
Unity crashing with runtime error, when accessing opencv function in unity. [HELP]!!! 1 Answer
[SOLVED] Copying assembly from 'Temp/....dll' to 'Library/...' failed (project stucked) 0 Answers
I want to use transform command on my own library 1 Answer
Using RuntimeInitializeOnLoadMethod inside dll and using in iOS build 1 Answer
Cinemachine (or the unity compiler) broken due to some unknown reason 1 Answer