Correction for example C# code in 'A custom dock'

Code has two errors:
 _dock.DefaultSlot = DockSlot.LeftUl;
 _dock.AvailableLayouts = DockLayout.Horizontal | DockLayout.Floating;

Lines corrected to the proper types:

_dock.DefaultSlot = EditorDock.DockSlot.LeftUl; _dock.AvailableLayouts = EditorDock.DockLayout.Horizontal | EditorDock.DockLayout.Floating;
This commit is contained in:
Vladimir Garnovsky
2026-08-20 22:20:49 +02:00
committed by GitHub
parent e302d9055d
commit b93c71358b

View File

@@ -371,7 +371,7 @@ The script could look like this:
.. code-tab:: csharp
#if TOOLS
#if TOOLS
using Godot;
[Tool]
@@ -390,10 +390,10 @@ The script could look like this:
_dock.Title = "My Dock";
// Note that LeftUl means the left of the editor, upper-left dock.
_dock.DefaultSlot = DockSlot.LeftUl;
_dock.DefaultSlot = EditorDock.DockSlot.LeftUl; //DockSlot.LeftUl;
// Allow the dock to be on the left or right of the editor, and to be made floating.
_dock.AvailableLayouts = DockLayout.Horizontal | DockLayout.Floating;
_dock.AvailableLayouts = EditorDock.DockLayout.Horizontal | EditorDock.DockLayout.Floating;
AddDock(_dock);
}