Component:FieldEditor: Difference between revisions

From Resonite Wiki
Automated: update SyncDelegates
update
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|EditingStarted[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true|
|EditingStarted:[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true| Called when editing starts, used with a [[Component:TextEditor|TextEditor]].
|EditingChanged[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true|
|EditingChanged:[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true| Called when editing value changes, used with a [[Component:TextEditor|TextEditor]].
|EditingFinished[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true|
|EditingFinished:[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|[[Type:Action`1|Action`1]]<[[Component:TextEditor|TextEditor]]>|true| Called when editing finishes, used with a [[Component:TextEditor|TextEditor]].
}}
}}



Latest revision as of 20:38, 19 March 2025

Component image 
Field Editor component as seen in the Scene Inspector

A FieldEditor component takes an IField of any type and deconstructs it's elements into a list of editor components.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
_targetField IField The field to generate an editor list for.
_textEditors list of TextEditor A list of text editors of the specified _targetField's components.
_textDrives list of FieldDrive`1<String> A list of text value fields to drive with the contents of the components of the specified _targetField.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
EditingStarted:Action`1<TextEditor> Action`1<TextEditor> Called when editing starts, used with a TextEditor.
EditingChanged:Action`1<TextEditor> Action`1<TextEditor> Called when editing value changes, used with a TextEditor.
EditingFinished:Action`1<TextEditor> Action`1<TextEditor> Called when editing finishes, used with a TextEditor.

Usage

Attach to a slot under a UIX Canvas hiearchy with a RectTransform and then insert an IField into _targetField to be edited for this component to generate an editor for the elements of the specified _targetField.

Examples

An IField<Float3> will make the field editor create a list with the X y and z components of the float3 field.

See Also