Skip to content
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

Language binding problem #1578

Open
JustDooooIt opened this issue Sep 12, 2024 · 2 comments
Open

Language binding problem #1578

JustDooooIt opened this issue Sep 12, 2024 · 2 comments

Comments

@JustDooooIt
Copy link

Godot version

4.3.stable

godot-cpp version

4.3.stable

System information

windows 11

Issue description

After using this method, the editor cannot detach the script and modify the visibility should be related to the implementation of GDExtensionScriptInstanceInfo3
436c41cf926de932afdd4dfcaa720e9

Steps to reproduce

create instance_info and script_instance

Minimal reproduction project

test.zip

@dsnopek
Copy link
Collaborator

dsnopek commented Sep 12, 2024

Thanks!

I haven't looked too deeply, but skimming your MRP, I suspect the issue is related to not completely implementing everything required from GDExtensionScriptInstanceInfo3. In fact, I don't see where you set any of the callbacks on instance_info?

I'm a little surprised, though, that it's _instance_create() that's causing issues in the editor and not _placeholder_instance_create(), since you've hard-coded _is_tool() to false, so I wouldn't expect the editor to create a real instance, but only a placeholder.

For placeholders, in general, I'd recommend using gdextension_interface_placeholder_script_instance_create() rather than making them custom.

And you may be interested in trying out the ScriptInstanceExtension class from PR #1544. I haven't had a chance to test the latest iteration of it, but assuming it works, it should make it a little easier to make your script instances.

@JustDooooIt
Copy link
Author

I don't know which interfaces are related to the functions of separate scripts and modify visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants