This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a JS engine backend for WebGL platform. It is implemented using Emscripten/Unity interoperability features. Implemented it in typescript, which can be built to generate the actual
jslib
file.Will solve issues like #47
A live example of how it works can be seen here. https://reactunity.github.io/reference/material/dialogs
It is possible to debug the script code as this backend will show files under
unity-jsb://
protocol.Currently there are some issues. There will be GC leaks in this version. I will fix this issue later. (Some API methods like SetPropertyInternal should automatically free values. I guess the GC issues are related to them. I don't know the full list of APIs that have this behavior. Will investigate.)I marked some API methods as TODO. I don't understand how they are supposed to work, so please comment if you have an idea of how to implement them. Also some API methods are not possible to implement.
Edit: I think all of the GC issues are fixed now. I don't have GC leaks in ReactUnity anymore even though it is doing a lot of interop.