reckfellENGINE

EditorProperty

Custom control for editing properties that can be added to the EditorInspector.

On this page
class EditorPropertyReckfellSharpEditorInherits Container

Custom control for editing properties that can be added to the EditorInspector.

A custom control for editing properties that can be added to the EditorInspector. It is added via EditorInspectorPlugin.

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

Constructors1

EditorPropertyConstructor
# EditorProperty
C#
public EditorProperty();

Properties12

CheckableProperty
# Checkable
C#
public bool Checkable { get; set; }

Used by the inspector, set to true when the property is checkable.

CheckedProperty
# Checked
C#
public bool Checked { get; set; }

Used by the inspector, set to true when the property is checked.

DeletableProperty
# Deletable
C#
public bool Deletable { get; set; }

Used by the inspector, set to true when the property can be deleted by the user.

DrawBackgroundProperty
# DrawBackground
C#
public bool DrawBackground { get; set; }

Used by the inspector, set to true when the property background is drawn.

DrawLabelProperty
# DrawLabel
C#
public bool DrawLabel { get; set; }

Used by the inspector, set to true when the property label is drawn.

DrawWarningProperty
# DrawWarning
C#
public bool DrawWarning { get; set; }

Used by the inspector, set to true when the property is drawn with the editor theme's warning color. This is used for editable children's properties.

KeyingProperty
# Keying
C#
public bool Keying { get; set; }

Used by the inspector, set to true when the property can add keys for animation.

LabelProperty
# Label
C#
public string Label { get; set; }

Set this property to change the label (if you want to show one).

NameSplitRatioProperty
# NameSplitRatio
C#
public float NameSplitRatio { get; set; }

Space distribution ratio between the label and the editing field.

ReadOnlyProperty
# ReadOnly
C#
public bool ReadOnly { get; set; }

Used by the inspector, set to true when the property is read-only.

SelectableProperty
# Selectable
C#
public bool Selectable { get; set; }

Used by the inspector, set to true when the property is selectable.

UseFoldingProperty
# UseFolding
C#
public bool UseFolding { get; set; }

Used by the inspector, set to true when the property is using folding.

Methods37

AddFocusablevoid
# AddFocusable
C#
public void AddFocusable(Control control);

If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.

Parameters
NameTypeDefault
controlControl—
Deselectvoid
# Deselect
C#
public void Deselect();

Draw property as not selected. Used by the inspector.

EmitChangedvoid
# EmitChanged
C#
public void EmitChanged(StringName property, Variant value, StringName field = null, bool changing = false);

Reports a user edit to Inspector. Do not replace with direct assignment when editor change handling and Undo/Redo are needed. Do not call merely to refresh a widget from model data.

Parameters
NameTypeDefault
propertyStringName—
valueVariant—
fieldStringNamenull
changingboolfalse
property

Changed property name, normally GetEditedProperty().

value

New Variant-compatible value, not the widget itself.

field

Optional subcomponent name; the example leaves it empty for a whole-property edit.

changing

Continuous-change flag, such as while typing. The completed numeric-step example uses false; drag gestures were not tested.

GetEditedObjectReckfellObject
# GetEditedObject
C#
public ReckfellObject GetEditedObject();

Reads the object assigned to this EditorProperty by Inspector. Check for an object before Get during initialization or selection changes.

Returns ReckfellObject

Current ReckfellObject or null. The check returned the DocsInspectorSettings opened in the main Inspector.

GetEditedPropertyStringName
# GetEditedProperty
C#
public StringName GetEditedProperty();

Reads the property name bound to this widget by Inspector. Use for Get and EmitChanged rather than hardcoding another field.

Returns StringName

Bound-property StringName; Amount was checked. Distinct from display Label.

GetLabelstring
# GetLabel
C#
public string GetLabel();
Returns string
GetNameSplitRatiofloat
# GetNameSplitRatio
C#
public float GetNameSplitRatio();
Returns float
IsCheckablebool
# IsCheckable
C#
public bool IsCheckable();
Returns bool
IsCheckedbool
# IsChecked
C#
public bool IsChecked();
Returns bool
IsDeletablebool
# IsDeletable
C#
public bool IsDeletable();
Returns bool
IsDrawBackgroundbool
# IsDrawBackground
C#
public bool IsDrawBackground();
Returns bool
IsDrawLabelbool
# IsDrawLabel
C#
public bool IsDrawLabel();
Returns bool
IsDrawWarningbool
# IsDrawWarning
C#
public bool IsDrawWarning();
Returns bool
IsKeyingbool
# IsKeying
C#
public bool IsKeying();
Returns bool
IsReadOnlybool
# IsReadOnly
C#
public bool IsReadOnly();
Returns bool
IsSelectablebool
# IsSelectable
C#
public bool IsSelectable();
Returns bool
IsSelectedbool
# IsSelected
C#
public bool IsSelected();

Returns true if property is drawn as selected. Used by the inspector.

Returns bool
IsUsingFoldingbool
# IsUsingFolding
C#
public bool IsUsingFolding();
Returns bool
Selectvoid
# Select
C#
public void Select(int focusable = -1);

Draw property as selected. Used by the inspector.

Parameters
NameTypeDefault
focusableint-1
SetBottomEditorvoid
# SetBottomEditor
C#
public void SetBottomEditor(Control editor);

Puts the editor control below the property label. The control must be previously added using Entity.AddChild.

Parameters
NameTypeDefault
editorControl—
SetCheckablevoid
# SetCheckable
C#
public void SetCheckable(bool checkable);
Parameters
NameTypeDefault
checkablebool—
SetCheckedvoid
# SetChecked
C#
public void SetChecked(bool @checked);
Parameters
NameTypeDefault
checkedbool—
SetDeletablevoid
# SetDeletable
C#
public void SetDeletable(bool deletable);
Parameters
NameTypeDefault
deletablebool—
SetDrawBackgroundvoid
# SetDrawBackground
C#
public void SetDrawBackground(bool drawBackground);
Parameters
NameTypeDefault
drawBackgroundbool—
SetDrawLabelvoid
# SetDrawLabel
C#
public void SetDrawLabel(bool drawLabel);
Parameters
NameTypeDefault
drawLabelbool—
SetDrawWarningvoid
# SetDrawWarning
C#
public void SetDrawWarning(bool drawWarning);
Parameters
NameTypeDefault
drawWarningbool—
SetKeyingvoid
# SetKeying
C#
public void SetKeying(bool keying);
Parameters
NameTypeDefault
keyingbool—
SetLabelvoid
# SetLabel
C#
public void SetLabel(string text);
Parameters
NameTypeDefault
textstring—
SetLabelReferencevoid
# SetLabelReference
C#
public void SetLabelReference(Control control);

Used by the inspector, set to a control that will be used as a reference to calculate the size of the label.

Parameters
NameTypeDefault
controlControl—
SetNameSplitRatiovoid
# SetNameSplitRatio
C#
public void SetNameSplitRatio(float ratio);
Parameters
NameTypeDefault
ratiofloat—
SetObjectAndPropertyvoid
# SetObjectAndProperty
C#
public void SetObjectAndProperty(ReckfellObject @object, StringName property);

Assigns object and property to edit.

Parameters
NameTypeDefault
objectReckfellObject—
propertyStringName—
SetReadOnlyvoid
# SetReadOnly
C#
public void SetReadOnly(bool readOnly);

Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.

Parameters
NameTypeDefault
readOnlybool—
SetSelectablevoid
# SetSelectable
C#
public void SetSelectable(bool selectable);
Parameters
NameTypeDefault
selectablebool—
SetUseFoldingvoid
# SetUseFolding
C#
public void SetUseFolding(bool useFolding);
Parameters
NameTypeDefault
useFoldingbool—
UpdatePropertyvoid
# UpdateProperty
C#
public void UpdateProperty();

When this virtual function is called, you must update your editor.

_SetReadOnlyvoid
# _SetReadOnly
C#
public virtual void _SetReadOnly(bool readOnly);

Callback for synchronizing custom controls with read-only mode. Appearance alone is insufficient: also guard the handler that emits changes.

Parameters
NameTypeDefault
readOnlybool—
readOnly

true disables editing through your UI; false restores ordinary editing.

_UpdatePropertyvoid
# _UpdateProperty
C#
public virtual void _UpdateProperty();

Refreshes UI from current model state. Read GetEditedObject/GetEditedProperty and update without an edit signal; the example uses SetValueNoSignal.

Signals and events13

MultiplePropertiesChangedEvent
# MultiplePropertiesChanged
C#
public event EditorProperty.MultiplePropertiesChangedEventHandler MultiplePropertiesChanged;

Emit it if you want multiple properties modified at the same time. Do not use if added via EditorInspectorPlugin._ParseProperty.

Handler parameters
NameTypeDefault
propertiesstring[]—
valueReckfell.Collections.Array—
ObjectIdSelectedEvent
# ObjectIdSelected
C#
public event EditorProperty.ObjectIdSelectedEventHandler ObjectIdSelected;

Used by sub-inspectors. Emit it if what was selected was an Object ID.

Handler parameters
NameTypeDefault
propertyStringName—
idlong—
PropertyCanRevertChangedEvent
# PropertyCanRevertChanged
C#
public event EditorProperty.PropertyCanRevertChangedEventHandler PropertyCanRevertChanged;

Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.

Handler parameters
NameTypeDefault
propertyStringName—
canRevertbool—
PropertyChangedEvent
# PropertyChanged
C#
public event EditorProperty.PropertyChangedEventHandler PropertyChanged;

Do not emit this manually, use the EditorProperty.EmitChanged method instead.

Handler parameters
NameTypeDefault
propertyStringName—
valueVariant—
fieldStringName—
changingbool—
PropertyCheckedEvent
# PropertyChecked
C#
public event EditorProperty.PropertyCheckedEventHandler PropertyChecked;

Emitted when a property was checked. Used internally.

Handler parameters
NameTypeDefault
propertyStringName—
checkedbool—
PropertyDeletedEvent
# PropertyDeleted
C#
public event EditorProperty.PropertyDeletedEventHandler PropertyDeleted;

Emitted when a property was deleted. Used internally.

Handler parameters
NameTypeDefault
propertyStringName—
PropertyFavoritedEvent
# PropertyFavorited
C#
public event EditorProperty.PropertyFavoritedEventHandler PropertyFavorited;

Emit it if you want to mark a property as favorited, making it appear at the top of the inspector.

Handler parameters
NameTypeDefault
propertyStringName—
favoritedbool—
PropertyKeyedEvent
# PropertyKeyed
C#
public event EditorProperty.PropertyKeyedEventHandler PropertyKeyed;

Emit it if you want to add this value as an animation key (check for keying being enabled first).

Handler parameters
NameTypeDefault
propertyStringName—
PropertyKeyedWithValueEvent
# PropertyKeyedWithValue
C#
public event EditorProperty.PropertyKeyedWithValueEventHandler PropertyKeyedWithValue;

Emit it if you want to key a property with a single value.

Handler parameters
NameTypeDefault
propertyStringName—
valueVariant—
PropertyOverriddenEvent
# PropertyOverridden
C#
public event Action PropertyOverridden;

Emitted when a setting override for the current project is requested.

PropertyPinnedEvent
# PropertyPinned
C#
public event EditorProperty.PropertyPinnedEventHandler PropertyPinned;

Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class.

Handler parameters
NameTypeDefault
propertyStringName—
pinnedbool—
ResourceSelectedEvent
# ResourceSelected
C#
public event EditorProperty.ResourceSelectedEventHandler ResourceSelected;

If you want a sub-resource to be edited, emit this signal with the resource.

Handler parameters
NameTypeDefault
pathstring—
resourceResource—
SelectedEvent
# Selected
C#
public event EditorProperty.SelectedEventHandler Selected;

Emitted when selected. Used internally.

Handler parameters
NameTypeDefault
pathstring—
focusableIdxlong—
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.