mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Fix C# main screen plugin example and document C# EditorInterface singleton (#9399)
* 🐞 fix(plugins): fix syntax errors Correct the syntax errors in the plugin development section, specifically by modifying 'EditorInterface' to 'EditorInterface.Singleton' in the C# portion. It is imperative to utilize the singleton pattern here to ensure the plugin successfully compiles. * 🐞 fix(different): ADD exceptions Provide explanations for Singleton exceptions of `EditorInterface`
This commit is contained in:
@@ -363,6 +363,17 @@ Example:
|
||||
|
||||
Input.Singleton.JoyConnectionChanged += Input_JoyConnectionChanged;
|
||||
|
||||
If you are developing main screen plugins using C#, it is essential to note the
|
||||
distinctions between ``GDScript`` and ``C#`` during setup. Unlike in ``GDScript``,
|
||||
this portion is not a static class in ``C#``. Consequently, you must employ the singleton
|
||||
pattern to obtain an instance of the ``EditorInterface``:
|
||||
|
||||
==================== ==============================================================
|
||||
GDScript C#
|
||||
==================== ==============================================================
|
||||
``EditorInterface`` ``EditorInterface.Singleton``
|
||||
==================== ==============================================================
|
||||
|
||||
String
|
||||
------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user