-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Bug]: Strings over RPC fail to be parsed #13
Comments
Use-case: Our testing process requires that we send GUIDs over RPC for loading worlds, since actually browsing for the world in UI is currently an overly-complicated task for automation. WORKAROUND: Sending a Dict[str, Any] seems to work fine: # Send any GUID over RPC
gamium.execute_rpc(
RpcBy.method(
"Your.RPC.Class",
"AMethodThatAcceptsAJSONObject",
{"guid": "c11557d5-ffcc-47fc-9263-2b1717eb070d"},
)
) You will, however, need to change your method signature: /// <summary>
/// Test method
/// </summary>
[Preserve]
public static void AMethodThatAcceptsAJSONObject(JObject json)
{
var guid = (string)json["guid"];
Debug.Log("AMethodThatAcceptsAJSONObject: "+guid);
} |
The problematic code has been fixed, but deploy will be delayed due to PyPI account issues. |
Fixed in version 2.0.10. |
Steps to reproduce
Expected result
Client successfully sends the request and prints out
SUCCESS
in console.Actual result
Client crashes prior to sending request to server.
Version
2.0.9
The text was updated successfully, but these errors were encountered: