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

Partially revert #96780, remove warnings from project/editor settings _get. #97817

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Oct 4, 2024

Instead of adding get_class_name() checks (which only works for registered properties, but not for dynamic), removes warnings from project/editor settings _get.

If we want to keep these warnings, it won't be straightforward to do, since there is no fully functional _has equivalent for _get/_set and adding it will be a breaking change (or we can add a special exception for EditorSetting and ProjectSettings). But these warnings are probably excessive, none of the other _get overrides show any warnings, and GDScript documentation for _get is return "null" if property is not handled by override, so calling _get for nonexistent property should not be considered abnormal.

@Mickeon
Copy link
Contributor

Mickeon commented Oct 4, 2024

I read the explanation but I'm a bit confused on why keeping the warning is a problem, once you revert the above PR. Sometimes I am annoyed by it, but this warning can be pretty useful as the entirely of ProjectSettings is based on accessing settings this way.

I guess get_setting & co. are encouraged, though.

@bruvzg
Copy link
Member Author

bruvzg commented Oct 4, 2024

I read the explanation but I'm a bit confused on why keeping the warning is a problem, once you revert the above PR.

It will reintroduce #96769, since resource loader will try loading nonexistent default value to determine Dictionary / Array type info.

I guess get_setting & co. are encouraged, though.

It can be used for EditorSettings and ProjectSettings, but not for generic Resource.

entirely of ProjectSettings is based on accessing settings this way.

In most cased it should be using get_setting_with_override (aka GLOBAL_GET) and I have not removed warning from it (since it's specific to ProjectSettings method).

@akien-mga akien-mga changed the title Partially revert 96780, remove warnings from project/editor settings _get. Partially revert #96780, remove warnings from project/editor settings _get. Oct 4, 2024
@akien-mga akien-mga merged commit aaffffc into godotengine:master Oct 4, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Custom resource data imported via EditorImportPlugin not read in game
3 participants