Skip to content

Commit 1e09066

Browse files
committed
Fixed examples that lead to build failed
1 parent d4ad7ca commit 1e09066

File tree

9 files changed

+11
-0
lines changed

9 files changed

+11
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ using Godot;
3535

3636
[Tool]
3737
public partial class SayYourName : Node2D {
38+
#if TOOLS
3839
public void ExtendInspectorBegin(ExtendableInspector inspector) {
3940
Button button = new() {
4041
Text = "Say your name"
4142
};
4243
button.Pressed += () => GD.Print(Name);
4344
inspector.AddCustomControl(button);
4445
}
46+
#endif
4547
}
4648
```
4749

addons/extendable_inspector_for_cs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ using Godot;
3535

3636
[Tool]
3737
public partial class SayYourName : Node2D {
38+
#if TOOLS
3839
public void ExtendInspectorBegin(ExtendableInspector inspector) {
3940
Button button = new() {
4041
Text = "Say your name"
4142
};
4243
button.Pressed += () => GD.Print(Name);
4344
inspector.AddCustomControl(button);
4445
}
46+
#endif
4547
}
4648
```
4749

addons/extendable_inspector_for_cs/example/ChangeRandomColor/ChangeRandomColor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ public void ChangeToRandomColor() {
88
material.AlbedoColor = new Color(GD.Randf(), GD.Randf(), GD.Randf());
99
}
1010

11+
#if TOOLS
1112
public void ExtendInspectorBegin(ExtendableInspector inspector) {
1213
Button button = new() {
1314
Text = "Change To Random Color"
1415
};
1516
button.Pressed += ChangeToRandomColor;
1617
inspector.AddCustomControl(button);
1718
}
19+
#endif
1820
}

addons/extendable_inspector_for_cs/example/SayYourName/SayYourName.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
[Tool]
44
public partial class SayYourName : Node2D {
5+
#if TOOLS
56
public void ExtendInspectorBegin(ExtendableInspector inspector) {
67
Button button = new() {
78
Text = "Say your name"
89
};
910
button.Pressed += () => GD.Print(Name);
1011
inspector.AddCustomControl(button);
1112
}
13+
#endif
1214
}

addons/extendable_inspector_for_cs/example/SpiralCurveCreator/SpiralCurveCreator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ private Path3D GetPathNode() {
3737
return GetNode<Path3D>("Path3D");
3838
}
3939

40+
#if TOOLS
4041
public void ExtendInspectorBegin(ExtendableInspector inspector) {
4142
Button button = new() {
4243
Text = "Draw Espiral"
4344
};
4445
button.Pressed += DrawEspiral;
4546
inspector.AddCustomControl(button);
4647
}
48+
#endif
4749
}

builds/Test.console.exe

182 KB
Binary file not shown.

builds/Test.exe

57.1 MB
Binary file not shown.

builds/Test.pck

310 KB
Binary file not shown.

project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ config_version=5
1111
[application]
1212

1313
config/name="ExtendableInspector"
14+
run/main_scene="res://addons/extendable_inspector_for_cs/example/SayYourName/SayYourName.tscn"
1415
config/features=PackedStringArray("4.2", "C#")
1516

1617
[dotnet]

0 commit comments

Comments
 (0)