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

On "Making main screen plugins" page, EditorInterface methods called as if static on C#, when they are not #10092

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tutorials/plugins/editor/making_main_screen_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Add five extra methods such that the script looks like this:

public override Texture2D _GetPluginIcon()
{
return EditorInterface.GetEditorTheme().GetIcon("Node", "EditorIcons");
return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
}
}
#endif
Expand Down Expand Up @@ -210,7 +210,7 @@ Here is the full plugin script:
{
MainPanelInstance = (Control)MainPanel.Instantiate();
// Add the main panel to the editor's main viewport.
EditorInterface.GetEditorMainScreen().AddChild(MainPanelInstance);
EditorInterface.Singleton.GetEditorMainScreen().AddChild(MainPanelInstance);
// Hide the main panel. Very much required.
_MakeVisible(false);
}
Expand Down Expand Up @@ -244,7 +244,7 @@ Here is the full plugin script:
public override Texture2D _GetPluginIcon()
{
// Must return some kind of Texture for the icon.
return EditorInterface.GetEditorTheme().GetIcon("Node", "EditorIcons");
return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
}
}
#endif
Expand Down