Click or drag to resize

EditorPluginAddCustomType Method

Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.

When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.

You can use the virtual method Handles(Object) to check if your custom object is being edited by checking the script or using the is keyword.

During run-time, this will be a simple object with a script so this function does not need to be called then.

Namespace:  Godot
Assembly:  GodotSharpEditor (in GodotSharpEditor.dll) Version: 1.0.0
Syntax
C#
public void AddCustomType(
	string type,
	string base,
	Script script,
	Texture icon
)

Parameters

type
Type: SystemString

[Missing <param name="type"/> documentation for "M:Godot.EditorPlugin.AddCustomType(System.String,System.String,Godot.Script,Godot.Texture)"]

base
Type: SystemString

[Missing <param name="base"/> documentation for "M:Godot.EditorPlugin.AddCustomType(System.String,System.String,Godot.Script,Godot.Texture)"]

script
Type: GodotScript

[Missing <param name="script"/> documentation for "M:Godot.EditorPlugin.AddCustomType(System.String,System.String,Godot.Script,Godot.Texture)"]

icon
Type: GodotTexture

[Missing <param name="icon"/> documentation for "M:Godot.EditorPlugin.AddCustomType(System.String,System.String,Godot.Script,Godot.Texture)"]

See Also