lwb
2021-01-21 d96addbbe88584db54bd83d590eb019877908f16
SdkProject/library/src/main/java/com/secondworld/sdk/UnityMsgHandler.java
@@ -87,21 +87,19 @@
    }
    public static void sendMessageToUnity(int code) {
        Map<String, Object> args = new HashMap<>();
        args.put("code", code);
        UnityMsgHandler.sendMessageToUnity(args);
        UnityMsgHandler.sendMessageToUnity(code,null);
    }
    /**
     * 发送消息到unity
     *
     * @param jsonMap
     * @param args
     */
    public static void sendMessageToUnity(Map<String, Object> jsonMap) {
        if (jsonMap == null || jsonMap.isEmpty()) {
            return;
        }
        JSONObject jsonObject = new JSONObject(jsonMap);
    public static void sendMessageToUnity(int code, Map<String, Object> args) {
        if (args == null)
            args = new HashMap<>();
        args.put("code", code);
        JSONObject jsonObject = new JSONObject(args);
        if (GameApp.I.isDemo()) {
            LogUtil.debug("发送消息到unity", jsonObject.toString());
            return;