-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor plugin #113
Open
migueldeicaza
wants to merge
121
commits into
main
Choose a base branch
from
editor-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Editor plugin #113
+7,770
−809
Conversation
This file contains 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
…e, to prevent gratuitous rebuilds - sadly does not seem to make a difference
…e obvious solutions do not work
Godot sadly does not annotate their functions and properties to include information whether they are optional or not. This is an issue that has been raised a long time ago and has gained little to no traction: godotengine/godot-proposals#2241 This poses a problem, because certain Godot APIs would return nil, and I would try to create an object out of it, and crash, while a nil return is ok. It also posed a problem for APIs that could take a nil parameter, but instead, in SwiftGodot, you had to create an instance of the object, even if it is unnecesary or not the desired outcome. So I have now settled on an evolutionary plan: * For now, all reference types that could have been nil either as a parameter or a return value, are declared as swift optionals. * I have introduced a hardcoded list of method return types and method arguments that can be used to flag exceptions to this: scenarios where we can verify that the return value would never be nil, or the parameter demands a non-nil argument. The list currently is hardcoded in Swift, but will eventually move to a Json file to make it easier to work with. Sadly, this means that there will be some churn, until all this is properly validated. This is a fix for this issue: #63 Some additional data: * Some 114 property returns were affected * Some 432 method returns were affected
Port over the macros meant to go upstream. As the sole author of the macro library, I give permission to have these licensed under the same license as the SwiftGodot project.
Utilizes thew new macros introduced in the previous commit.
Co-authored-by: Padraig <[email protected]>
This should emit a message to the Godot console before crashing that a texture couldn't be loaded, with the respective file and line.
This is missing the SwiftGodotMacros import (see #131).
The tutorial now includes the step for adding SwiftGodotMacros to Package.swift. The README now also demonstrates the initSwiftExtension macro.
…'.shared' idiom; Following what C# does here
…: the generated uid is broken, and I need solve the need for two libraries rather than one, and the clash with the Editor
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.
No description provided.