-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Expose PlaceHolderScriptInstance to GDExtension #80394
Expose PlaceHolderScriptInstance to GDExtension #80394
Conversation
91055ac
to
9c2651a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I haven't had a chance to test this yet, which I'd really like to do, but at a high-level, this looks great :-)
6e04259
to
6ca7ced
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've started messing around with this with godot-cpp, and I think it'd be sufficient for my cppscript experiment.
I also spent some time reading through the Luau binding's code, and I think this would be sufficient for its purposes as well.
However, I noticed a small naming issue which is pointed out in the code comments. But after that is fixed, I think I'm personally happy with this PR!
Co-authored-by: David Snopek <[email protected]>
70e98a2
to
4b5da7e
Compare
Fixed the naming issue and rebased on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks great to me :-)
Thanks! |
Exposes
PlaceHolderScriptInstance
used by thegdscript
andcsharp_script
modules in Godot to GDExtension.While use of this class is technically optional as placeholder implementation can be done with the existing interface, exposing it allows extensions to avoid reimplementing the entire behavior.
This would likely be useful for existing language bindings:
ScriptInstance
implementation and disabledcall
when used as a placeholder.PlaceHolderScriptInstance
I've started using this in my Python bindings and it seems to work quite well. Without this I would be doing what has been done for the luau bindings.