Update to 4.x, adding 4.x workaround#2
Open
moritz-junge wants to merge 17 commits intonsrosenqvist:mainfrom
Open
Update to 4.x, adding 4.x workaround#2moritz-junge wants to merge 17 commits intonsrosenqvist:mainfrom
moritz-junge wants to merge 17 commits intonsrosenqvist:mainfrom
Conversation
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 updates the extension to Godot 4.x but can no longer be used like this:
but instead needs to be used with preload:
This also adds a workaround for that problem allowing the name to be used as a string instead like this:
However this interprets the strings in the array as GDScript code which could potentaly lead to some problems and isn't tested in an exported project (where this plugin should probably be removed anyways, as it is not needed at runtime).
The README is updated accordingly and I also made this a fully fledged extension instead of a script you needed to add to the autoload yourself.
I also provided a runnable example in this repo (not the extension in the addons/ folder), therefore adding a project.godot to the project.
I haven't tested this with the new 4.2 RC but it worked with the 4.2beta and 4.1stable and there is no reason it shouldn't work.