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

State: explicitly use internal state #82

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

Garteal
Copy link
Contributor

@Garteal Garteal commented Aug 26, 2024

Explicitly uses the ImGuiGodot.Internal State instead.
Fixes name clashing if a project already has a State.

@pkdawson
Copy link
Owner

There shouldn't be a conflict unless there's a class called State in the global namespace. C# code should always be namespaced to avoid exactly this kind of problem.

Since C# 10 you can just stick namespace MyGameName; or whatever at the top of your .cs files. Godot will find your classes in any namespace.

@Garteal
Copy link
Contributor Author

Garteal commented Aug 26, 2024

And that's exactly the setup I have right now. Of course it's better to namespace the whole thing, but IMO it should not be explicitly required. And IMO an external library/addon/whatever shouldn't cause this kind of name clash.

@pkdawson pkdawson merged commit 013abeb into pkdawson:master Aug 27, 2024
7 checks passed
@Garteal Garteal deleted the internal-state branch August 27, 2024 23:32
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

Successfully merging this pull request may close these issues.

2 participants