private EngineBridge() { if (Platform.isAndroid()) { bridge = BridgeAndroid.GetInstance(); } else if (Platform.isIOS()) { bridge = BridgeIOS.GetInstance(); } }
static void engineBridgeDelegate(string resultJson) { Debug.Log("resultJson From IOS:" + resultJson); Result result = new Result(resultJson); Dictionary <string, Action <Result> > actionDic = BridgeIOS.GetInstance().GetDictionary(); Action <Result> action = null; if (actionDic != null && actionDic.ContainsKey(result.callbackId)) { action = actionDic[result.callbackId]; } if (action != null) { action(result); } }