Make library compatible with newer versions of Godot (tested with Godot 3.5.3 LTS) #8
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.
The changes in this pull request should make
react-godot
be able to run Godot games exported with Godot version 3.5.3 LTS (and possibly others).This change maintains backwards compatibility with whatever version of Godot the library was previously created with.
Major Changes
instance
. Required to compile the project.package.json
to indicate compatibility with React 17 and 18. I have tested with React 18, the example project uses React 16. An error onnpm install
will occur otherwise when using newer versions of React.package.json
references to useindex.js
instead ofindex.es.js
, which does not exist.strict
mode for Typescript checking and remove a soon to be removed property. Fix all errors that occur due to typing.wasm
file. Add this as another prop.Minor Changes
package-lock.json
versions, this was automatically done when runningnpm install
.Edited files have been automatically formatted to match the default settings of the Prettier code formatter. If you prefer a different code style, please let me know.I see that this project uses the standard code style, rants-standard --fix src/
to match the code style.Engine
andEngineLoaderDescription
types so that they are accessible externally. This is an optional change, I can move it to another PR or remove it altogether.Notes
example
project.example
, I had to also run the following commands after I did anpm install
:If you do not run these commands, you will get an invalid hook call error when trying to run the example project. This seems to be caused by including a local module, more information about this can be found here.
example
game:Simple exported game with Godot 3.5.3 LTS
Future Improvements
Engine
object. If a way exists, this would simplify the logic necessary to maintain backwards compatibility.any
in a few places that can probably be converted toError
with more tweaks and testing. No newany
s are introduced, I just convert the implicitany
s to explicit ones.