msgpack-cli icon indicating copy to clipboard operation
msgpack-cli copied to clipboard

Error in Unity WebGL build

Open endel opened this issue 7 years ago • 1 comments

Hey there,

First of all, thanks for this awesome library.

I'm importing the binary unity (not unity-full, version 0.9.0-beta1) and building for the web and here's the error that I get:

Attempting to call method 'MsgPack.Serialization.SerializationContext::GetSerializer' for which no ahead of time (AOT) code was generated.
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.

Is this error expected? I see that @tametick had a similar issue, but I'm not sure if it's the same.

Cheers!

endel avatar Nov 06 '16 19:11 endel

Sorry for delay. It should be same (AOT issue) which is caused by missing MessagePackSerialiazer.PrepareType<T>() call for required types...

Please try to call PrepareType<T> for you want to (de)serialize and its dependencies.

It should be more accurate when you put the full stack trace if available.

yfakariya avatar Nov 09 '16 01:11 yfakariya