ialex32x / unity-jsb

It brings Javascript runtime capability to Unity3D by integrating QuickJS.
MIT License
335 stars 41 forks source link

[WebGL backend] Make WebSocket and XHR scoped to context, add base url support #93

Closed KurtGokhan closed 2 years ago

KurtGokhan commented 2 years ago

This PR makes XHR, fetch and WebSocket requests created in WebGL backend scoped to the context they were created in. So that when context is disposed, the request is disposed as well. Also added base url support. With this, relative URLs will be resolved relative to that base url. One use case for this is providing the dev server URL when you are running Webpack, so that users get hot reloading.