reckfellENGINE

EditorInspectorPlugin

Plugin for adding custom property editors on the inspector.

On this page
class EditorInspectorPluginReckfellSharpEditorInherits RefCounted

Plugin for adding custom property editors on the inspector.

EditorInspectorPlugin allows adding custom property editors to EditorInspector. When an object is edited, the EditorInspectorPlugin._CanHandle function is called and must return true if the object type is supported. If supported, the function EditorInspectorPlugin._ParseBegin will be called, allowing to place custom controls at the beginning of the class. Subsequently, the EditorInspectorPlugin._ParseCategory and EditorInspectorPlugin._ParseProperty are called for every category and property. They offer the ability to add custom controls to the inspector too. Finally, EditorInspectorPlugin._ParseEnd will be called. On each of these calls, the "add" functions can be called. To use EditorInspectorPlugin, register it using the EditorPlugin.AddInspectorPlugin method first.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

EditorInspectorPluginConstructor
# EditorInspectorPlugin
C#
public EditorInspectorPlugin();

Methods11

AddCustomControlvoid
# AddCustomControl
C#
public void AddCustomControl(Control control);

Adds a custom control, which is not necessarily a property editor.

Parameters
NameTypeDefault
controlControl—
AddPropertyEditor2 overloads
# AddPropertyEditor · 1/2
C#
public void AddPropertyEditor(string property, Control editor, bool addToEnd);

Adds a property editor for an individual property. The editor control must extend EditorProperty. There can be multiple property editors for a property. If add_to_end is true, this newly added editor will be displayed after all the other editors of the property whose add_to_end is false. For example, the editor uses this parameter to add an "Edit Region" button for Sprite2D.RegionRect below the regular Rect2 editor. label can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead.

Parameters
NameTypeDefault
propertystring—
editorControl—
addToEndbool—
# AddPropertyEditor · 2/2
C#
public void AddPropertyEditor(string property, Control editor, bool addToEnd = false, string label = "");

Adds UI for one property during a parse callback. The Control must be an EditorProperty; a bare SpinBox does not gain property binding and editor data flow.

Parameters
NameTypeDefault
propertystring—
editorControl—
addToEndboolfalse
labelstring""
property

Exact property name/path received by _ParseProperty.

editor

Created EditorProperty. Inspector manages its UI lifetime after registration.

addToEnd

true places after editors for this property with addToEnd=false. Does not itself suppress the standard field.

label

Custom caption. An empty string derives it from the property name; the example supplies Amount.

AddPropertyEditorForMultipleProperties2 overloads
# AddPropertyEditorForMultipleProperties · 1/2
C#
public void AddPropertyEditorForMultipleProperties(string label, ReadOnlySpan<string> properties, Control editor);

Adds an editor that allows modifying multiple properties. The editor control must extend EditorProperty.

Parameters
NameTypeDefault
labelstring—
propertiesReadOnlySpan<string>—
editorControl—
# AddPropertyEditorForMultipleProperties · 2/2
C#
public void AddPropertyEditorForMultipleProperties(string label, string[] properties, Control editor);

Adds an editor that allows modifying multiple properties. The editor control must extend EditorProperty.

Parameters
NameTypeDefault
labelstring—
propertiesstring[]—
editorControl—
_CanHandlebool
# _CanHandle
C#
public virtual bool _CanHandle(ReckfellObject @object);

Decides whether the plugin participates in parsing this object. Restrict to a specific type/contract rather than every editor object; the example accepts only DocsInspectorSettings.

Parameters
NameTypeDefault
objectReckfellObject—
object

Object edited by Inspector; not necessarily an Entity or selected game character.

Returns bool

true allows further parse callbacks for this plugin. Does not itself create a widget or replace every field.

_ParseBeginvoid
# _ParseBegin
C#
public virtual void _ParseBegin(ReckfellObject @object);

Called to allow adding controls at the beginning of the property list for object.

Parameters
NameTypeDefault
objectReckfellObject—
_ParseCategoryvoid
# _ParseCategory
C#
public virtual void _ParseCategory(ReckfellObject @object, string category);

Called to allow adding controls at the beginning of a category in the property list for object.

Parameters
NameTypeDefault
objectReckfellObject—
categorystring—
_ParseEndvoid
# _ParseEnd
C#
public virtual void _ParseEnd(ReckfellObject @object);

Called to allow adding controls at the end of the property list for object.

Parameters
NameTypeDefault
objectReckfellObject—
_ParseGroupvoid
# _ParseGroup
C#
public virtual void _ParseGroup(ReckfellObject @object, string group);

Called to allow adding controls at the beginning of a group or a sub-group in the property list for object.

Parameters
NameTypeDefault
objectReckfellObject—
groupstring—
_ParsePropertybool
# _ParseProperty
C#
public virtual bool _ParseProperty(ReckfellObject @object, Variant.Type type, string name, PropertyHint hintType, string hintString, PropertyUsageFlags usageFlags, bool wide);

Chooses an individual property editor after _CanHandle. Add an EditorProperty for the intended name/type without consuming other properties. The example replaces only Amount.

Parameters
NameTypeDefault
objectReckfellObject—
typeVariant.Type—
namestring—
hintTypePropertyHint—
hintStringstring—
usageFlagsPropertyUsageFlags—
widebool—
object

Object being edited by Inspector.

type

Property Variant type; the example's double is Variant.Type.Float.

name

Exact object-property name/path. Pass it to AddPropertyEditor; not a translated caption.

hintType

Property hint type, such as Range. Editor metadata, not universal model validation.

hintString

Hint parameters, such as range bounds and step.

usageFlags

Property-usage bit flags, distinct from its value.

wide

Current Inspector wide-editor mode. Consider for layout; this example has no separate wide variant.

Returns bool

true suppresses the property's standard editor; false preserves standard handling. Add the widget separately.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.