You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addons/extendable_inspector_for_cs/README.md
+43-24Lines changed: 43 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,49 @@
2
2
3
3
Makes it easier to add custom inspector controls to nodes.
4
4
5
-

6
-

7
-

5
+

6
+

7
+

8
8
9
9
# How to install
10
10
11
11
Download the project and copy the addon folder into your godot project.
12
12
13
-
Go to Project Settings > Plugins, and enable Extendable Inspector.
13
+
Go to Project Settings > Plugins, and enable Extendable Inspector (C#).
14
14
15
15
# Quick Start / Tutorial
16
16
17
17
Let's add a button that prints the node name in godot's output:
18
-
- Choose the node that should have this control, make sure its script has the `@tool` annotation at the beginning, [this allows it to run code while in the editor](https://docs.godotengine.org/en/stable/tutorials/plugins/running_code_in_the_editor.html).
- Define a method called `_extend_inspector_begin` that receives a parameter, let's call that parameter `inspector`. If you want, you can type it as `ExtendableInspector` to get some autocomplete features:
- Create a button that when pressed, it prints the node's name. Then, simply add it to the inspector with `inspector.add_custom_control(a_control)`. You will have to unfocus the node and focus it again for the button to appear:
- Choose the node that should have this control, make sure its script has the `[Tool]` attribute at the class declaration, [this allows it to run code while in the editor](https://docs.godotengine.org/en/stable/tutorials/plugins/running_code_in_the_editor.html).
- Define a method called `ExtendInspectorBegin` that receives a parameter, let's call that parameter `inspector`. If you want, you can type it as `ExtendableInspector` to get some autocomplete features:
- Create a button that when pressed, it prints the node's name. Then, simply add it to the inspector with `inspector.AddCustomControl(ourNewControl)`. You will have to unfocus the node and focus it again for the button to appear:
Allows adding property-specific editors to the property list for object. The added editor control must extend `EditorProperty`. Returning `true` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
55
79
56
80
## Examples
57
81
58
-
Examples can be found in the [example folder](https://github.com/ProFiLeR4100/ExtendableInspectorForCS/tree/godot-4/addons/extendable_inspector/example)
59
-
60
-
## Utils
61
-
62
-
This plugin has a core folder that adds the functionality to let you extend the inspector with any custom control you define from your own scripts.
63
-
Apart from that, there's a `utils` folder that defines some already made controls that can be added to the inspector.
82
+
Examples can be found in the [example folder](https://github.com/ProFiLeR4100/ExtendableInspectorForCS/tree/godot-4/addons/extendable_inspector_for_cs/example)
0 commit comments