Component:FieldEditor: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
Line 3: Line 3:
|Name=Field Editor
|Name=Field Editor
}}
}}
{{stub}}
A '''FieldEditor''' component takes an IField of any type and deconstructs it's elements into a list of editor components.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|_targetField|IField|
|_targetField|IField| The field to generate an editor list for.
|_textEditors|{{RootFieldType|SyncRefList`1|[[Component:TextEditor|TextEditor]]}}|TypeAdv1=true|
|_textEditors|{{RootFieldType|SyncRefList`1|[[Component:TextEditor|TextEditor]]}}|TypeAdv1=true| A list of text editors of the specified <code>_targetField</code>'s components.
|_textDrives|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:String|String]]&gt;}}|TypeAdv2=true|
|_textDrives|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:String|String]]&gt;}}|TypeAdv2=true| A list of text value fields to drive with the contents of the components of the specified <code>_targetField</code>.
}}
}}


== Behavior ==
== Usage ==
Attach to a slot under a [[Component:Canvas|UIX Canvas]] hiearchy with a [[Component:RectTransform|RectTransform]] and then insert an [[Type:IField|IField]] into <code>_targetField</code> to be edited for this component to generate an editor for the elements of the specified <code>_targetField</code>.


== Examples ==
== Examples ==
An [[Type:IField|IField]]&lt;[[Type:Float3|Float3]]&gt; will make the field editor create a list with the X y and z components of the float3 field.


== See Also ==
== See Also ==
* [[Ref Hacking]]


[[Category:Components:Uncategorized{{#translation:}}|Field Editor]]
[[Category:Components:Uncategorized{{#translation:}}|Field Editor]]
[[Category:Components{{#translation:}}|Field Editor]]
[[Category:Components{{#translation:}}|Field Editor]]
[[Category:ComponentStubs]]

Revision as of 18:07, 22 February 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.

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