using System.Runtime.InteropServices; using UnityEngine; public class UnityToWeb { [DllImport("__Internal")] private static extern void OpenNewWindow(string str); public static void ToJSSendMsgByMQTT(string content) { OpenNewWindow(content); } }