sendMessage

fun sendMessage(methodName: String, data: JSONObject)

Sends a message to the specified game object with a method name and JSON data.

Parameters

methodName

The name of the method to invoke in the Unity game object.

data

The JSON data to send as arguments to the method.