Skip to content

Commit

Permalink
fix: python client string parameter passing error (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
yowpark committed Jun 4, 2024
1 parent 366a61b commit 5e0a253
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/python/gamium/gamium/gamium_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ def execute_rpc(
for param in locator.params:
if option.cast_number_to_float:
if isinstance(param, int):
params.append(str(float(param)))
params.append(json.dumps(float(param)))
continue
params.append(str(param))
params.append(json.dumps(param))
res = self._service.request(create_execute_rpc(locator.by, locator.class_name, locator.target_name, params))
if res.document is None:
return None
Expand Down
6 changes: 6 additions & 0 deletions engine/unity/Runtime/Private/Executer/CodebaseSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public static double CallParamReturn2(double param1)
return param1;
}

[Preserve]
public static void CallStringParam1(string param1)
{
Logger.Verbose($"CodebaseSample.CallStringParam1: {param1}");
}

[Preserve]
public static Dictionary<string, object> CallParamReturn3(double param1, double param2)
{
Expand Down

0 comments on commit 5e0a253

Please sign in to comment.