Tencent's hot update solution puerts, the official example is debugging under vscode,
private JsEnv jsEnv;
async void RunScript()
{
jsEnv = new JsEnv(new DefaultLoader("F:/UnityProjects/puerts_unity_demo-master/TsProj/output"), 8080);
await jsEnv.WaitDebuggerAsync();
jsEnv.Eval("require('QuickStart')");
}
void Start()
{
RunScript();
}
void Update()
{
jsEnv.Tick();
}
where 8080 is the port number;
- Click to add configuration
- choose the first
3. Fill in the above port number, select the js directory (use tsc to export js debugging for ts files)
4. Start unity and run debug;