void onWebQuery(UWKWebQuery query) { var request = UWKJson.Deserialize(query.Request) as Dictionary <string, object>; var message = request["message"] as string; if (message == "UnityMessage") { var payload = request["payload"] as Dictionary <string, object>; var messageCount = (long)payload["messageCount"]; query.Success("Query Response from Unity: Message Count = " + messageCount); } }
private static void onWebQuery(UWKWebQuery query) { var request = UWKJson.Deserialize(query.Request) as Dictionary <string, object>; var message = request ["message"] as string; if (message == "ButtonClicked") { var payload = UWKJson.Serialize(request ["payload"] as Dictionary <string, object>); query.Success("Query Response from Unity: Success!"); #if UNITY_EDITOR EditorUtility.DisplayDialog("Hello!", "Button clicked, value passed:\n" + payload, "OK!"); #endif } }