@@ -58,7 +58,7 @@ To continue with the example, use the following values:
5858 .. code-tab :: ini C#
5959
6060 Plugin Name: My Custom Node
61- Subfolder: my_custom_node
61+ Subfolder: MyCustomNode
6262 Description: A custom node made to extend the Godot Engine.
6363 Author: Your Name Here
6464 Version: 1.0.0
@@ -246,8 +246,8 @@ dialog. For that, change the ``custom_node.gd`` script to the following:
246246 {
247247 // Initialization of the plugin goes here.
248248 // Add the new type with a name, a parent type, a script and an icon.
249- var script = GD.Load<Script>("res://addons/my_custom_node /MyButton.cs");
250- var texture = GD.Load<Texture2D>("res://addons/my_custom_node/icon .png");
249+ var script = GD.Load<Script>("res://addons/MyCustomNode /MyButton.cs");
250+ var texture = GD.Load<Texture2D>("res://addons/MyCustomNode/Icon .png");
251251 AddCustomType("MyButton", "Button", script, texture);
252252 }
253253
@@ -367,21 +367,21 @@ The script could look like this:
367367 [Tool]
368368 public partial class CustomDock : EditorPlugin
369369 {
370- Control dock ;
370+ private Control _dock ;
371371
372372 public override void _EnterTree()
373373 {
374- dock = (Control) GD.Load<PackedScene>("addons/my_custom_dock/my_dock .tscn").Instantiate();
375- AddControlToDock(DockSlot.LeftUl, dock );
374+ _dock = GD.Load<PackedScene>("res:// addons/MyCustomDock/MyDock .tscn").Instantiate<Control> ();
375+ AddControlToDock(DockSlot.LeftUl, _dock );
376376 }
377377
378378 public override void _ExitTree()
379379 {
380380 // Clean-up of the plugin goes here.
381381 // Remove the dock.
382- RemoveControlFromDocks(dock );
382+ RemoveControlFromDocks(_dock );
383383 // Erase the control from the memory.
384- dock .Free();
384+ _dock .Free();
385385 }
386386 }
387387 #endif
0 commit comments