Removed some unnecessary logging, and remove "handler" requirement
This commit is contained in:
parent
3918e743e8
commit
ba3dd1e38e
|
@ -64,10 +64,6 @@ public class FlutterUnityView implements PlatformView, MethodChannel.MethodCallH
|
||||||
methodName = methodCall.argument("methodName");
|
methodName = methodCall.argument("methodName");
|
||||||
message = methodCall.argument("message");
|
message = methodCall.argument("message");
|
||||||
|
|
||||||
System.out.print(gameObject);
|
|
||||||
System.out.print(methodName);
|
|
||||||
System.out.print(message);
|
|
||||||
|
|
||||||
UnityUtils.postMessage(gameObject, methodName, message);
|
UnityUtils.postMessage(gameObject, methodName, message);
|
||||||
result.success(true);
|
result.success(true);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -58,9 +58,8 @@ class UnityWidgetController {
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {
|
Future<dynamic> _handleMethod(MethodCall call) async {
|
||||||
switch (call.method) {
|
switch (call.method) {
|
||||||
case "onUnityMessage":
|
case "onUnityMessage":
|
||||||
dynamic handler = call.arguments["handler"];
|
|
||||||
if (_unityWidgetState.widget != null) {
|
if (_unityWidgetState.widget != null) {
|
||||||
_unityWidgetState.widget.onUnityMessage(this, handler);
|
_unityWidgetState.widget.onUnityMessage(this, call.arguments);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Reference in New Issue