Closed N3X15 closed 5 months ago
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