-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fix C# main screen plugin example and document C# EditorInterface
singleton
#9399
Conversation
Correct the syntax errors in the plugin development section, specifically by modifying 'EditorInterface' to 'EditorInterface.Singleton' in the C# portion. It is imperative to utilise the singleton pattern here to ensure the plugin successfully compiles.
Are you sure this is needed? See here |
Yes, it is totally needed 🙂 |
Then this singleton is an exception, should probably be added to the documentation |
Provide explanations for Singleton exceptions of `EditorInterface`
I'm not entirely sure if this fully meets your requirements, but I have added a specific exception explanation to that section. |
I think if we want to make a table listing everywhere godot-docs/classes/class_editorplugin.rst Line 860 in 83a98d8
|
You're right, I will follow your advice and complete this list accordingly. |
This is because historically this class wasn't registered as a singleton, so when it became one in godotengine/godot#75694 we couldn't make it static without breaking compat. All the other singletons are static classes, although they also have a |
EditorInterface
singleton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current state was also verbally approved by raulsntos in the RC: https://chat.godotengine.org/channel/dotnet?msg=mJnHFdxJM75PhnRWN
Since the author turned off edits by maintainers, I am merging the current acceptable state and will make a followup PR for the wording adjustments.
Thank you, and congrats on your first merged contribution to the Godot documentation! |
Correct the syntax errors in the plugin development section, specifically by modifying
EditorInterface
toEditorInterface.Singleton
in the C# portion. It is imperative to utilise the singleton pattern here to ensure the plugin successfully compiles.