-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deserialization "object" type #13
Comments
Unfortunately, MessagePack doesn't preserve the type for integer values.
So if you try |
I suggest you do explicit deserialization by using generics instead of using casting.
|
In my case, this "formatter.Deserialize< int >(bytes);" - |
I will try and see if I can add an option to make this work |
It would be nice :) |
Example:
object test;
int i = 12;
test = i;
MessagePackFormatter formatter = new MessagePackFormatter();
byte[] bytes = formatter.Serialize(test);
test = formatter.Deserialize< object >(bytes);
Debug.Log((int)test); ---- error-----
Debug.Log(Convert.ToInt32(test)); - ---works---
if in the code change int to float code works
With unity types(Vector3,Quanternion and others), the error is the same ...
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: