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

Orchestrator Signal and Functions are initialized with incorrect usage flags #255

Open
Naros opened this issue Apr 16, 2024 · 1 comment

Comments

@Naros
Copy link
Member

Naros commented Apr 16, 2024

Describe the bug

The PropertyInfo struct initializes the usage property as 7 rather than as PROPERTY_USAGE_DEFAULT, which is 6. This seems to be a disconnect between GDExtension's godot-cpp source and the upstream Godot Engine changes made in 2022.

Expected behavior

Signal and Function arguments and return values should be initialized with 6 (PROPERTY_USAGE_DEFAULT).

Actual behavior

Signal and Function arguments and return values should be initialized with 7 (PROPERTY_USAGE_DEFAULT + 1).

How to Reproduce?

Create any Signal or Function and look at its return value or method arguments.

Godot full version

4.2.1-stable

Orchestrator version

2.0.stable

Additional information

Orchestrator can prevent this bug by simply ensuring that the PropertyInfo usage property is initialized using the engine's PROPERTY_USAGE_DEFAULT value rather than relying on the struct's initial value.

We'll likely need to define a clean-up hook for existing Orchestrations to sanitize the OScriptFunction and OScriptSignal definitions. This should not affect standard method data from the serialized engine.

@Naros
Copy link
Member Author

Naros commented Apr 17, 2024

Fixed in godot-cpp as godotengine/godot-cpp#1440

This is being backported for Godot 4.1, 4.2, and fixed in Godot 4.3

@Naros Naros added this to the 2.1 milestone Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant