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

Property hint not being used (regression in 3.5.rc4) #62493

Closed
cromerc opened this issue Jun 28, 2022 · 3 comments
Closed

Property hint not being used (regression in 3.5.rc4) #62493

cromerc opened this issue Jun 28, 2022 · 3 comments

Comments

@cromerc
Copy link

cromerc commented Jun 28, 2022

Godot version

3.5-rc5

System information

Linux Mint 20.3, Nvidia 1650

Issue description

When using an exported property hint from GDNative/godot-cpp, it no longer shows the expected types, instead it lists all resource types. And if you try to do a quick load, it shows all resource types in the project as well instead of just Packed Scenes.

This regression started in 3.5-rc4 and is still present in 3.5-rc5. However it worked as expected in 3.5-rc3.

This is the code used to register the property:
register_property<Main, Ref<PackedScene>>("level", &Main::set_level, &Main::get_level, NULL, GODOT_METHOD_RPC_MODE_DISABLED, GODOT_PROPERTY_USAGE_DEFAULT, GODOT_PROPERTY_HINT_RESOURCE_TYPE, String("PackedScene"));

Here are some images to show what is happening:
Click the node to see exported property for the PackedScene

Result(3.5-rc4 and rc5)

Expected result(3.5-rc3)

Steps to reproduce

  1. Build GDNative library.
  2. In godot select node that has the GDNative script attached.
  3. Try to choose a PackedScene resource.

Minimal reproduction project

project.zip

This project if run with 3.5-rc4 or rc5 has the regression. I included both the windows and linux GDNative libs already compiled to test it out with.

@Calinou Calinou added this to the 3.5 milestone Jun 28, 2022
@Calinou Calinou changed the title Property hint not being used Property hint not being used (regression in 3.5.rc4) Jun 28, 2022
@akien-mga
Copy link
Member

This is likely due to #61996 which added new property hints, so godot-headers (and godot-cpp) likely just need syncing.

@akien-mga
Copy link
Member

akien-mga commented Jun 28, 2022

Should be fixed by godotengine/godot-cpp@2b9843d, could you confirm? (Needs recompiling the libs of course)

@cromerc
Copy link
Author

cromerc commented Jun 28, 2022

Yes, that fixed it. Thanks.

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

No branches or pull requests

3 participants