MsgPack for JS cloud scripts


Is there a way to add MsgPack to Cloud Code (JS) scripts?
This will help with payload size, request speed and it will make the response/request paylod little bit harder to read.

If not, this will be something nice to have. Maybe not MsgPack, but something similar

I know we can use this package with cloud code modules but the c# modules system is still at the beggining and pretty hard to use.

Thank you!


Hello there,

If you use the Unity Editor to deploy the JS scripts, you can bundle MsgPack in like this:

import { encode, decode } from './msgpack'

The second step is necessary because the Cloud Code runtime doesn't support TextEncoder, which is necessary for MsgPack.

For more details on how to deploy with the Unity Editor, check out this page:


Thank you for the reply.

We'll check both JS+your solution above (which gave us a lot of other ideas :smile: ... thank you again) and C# modules implementations and see which one is a better approach for our project.

1 Like

A small bump that the URL has moved here:

1 Like