Component: Difference between revisions

From Resonite Wiki
m Fix empty paragraph
Marked this version for translation
Line 5: Line 5:
<translate><!--T:4--> For a list of all components, see [[:Category:Components]]. Components are organized in categories that match the game, so you can use the categories to figure out where to find a component.</translate>
<translate><!--T:4--> For a list of all components, see [[:Category:Components]]. Components are organized in categories that match the game, so you can use the categories to figure out where to find a component.</translate>


== <translate>Basic Properties</translate> ==
== <translate><!--T:5--> Basic Properties</translate> ==


=== <translate>Fields</translate> ===
=== <translate><!--T:6--> Fields</translate> ===


<translate><!--T:2--> Components contain fields, store data on the component for configuration, internal operation and output. Pages on individual components go in-depth on each component and their fields.</translate>
<translate><!--T:2--> Components contain fields, store data on the component for configuration, internal operation and output. Pages on individual components go in-depth on each component and their fields.</translate>


<translate>All components include at least the following built-in fields:</translate>
<translate><!--T:7--> All components include at least the following built-in fields:</translate>


{{Table TypeFields
{{Table TypeFields
|persistent|Bool|<translate>The <tvar name="persistent"><code>persistent</code></tvar> field determines whether this component will be saved, for example to the [[<tvar name=1>Inventory</tvar>|Inventory]]. If this field is set to <code>false</code>, the component will not be persisted when saved.</translate>
|persistent|Bool|<translate><!--T:8--> The <tvar name="persistent"><code>persistent</code></tvar> field determines whether this component will be saved, for example to the [[<tvar name=1>Inventory</tvar>|Inventory]]. If this field is set to <code>false</code>, the component will not be persisted when saved.</translate>
|UpdateOrder|Int|<translate>Controls the order in which this component updates, relative to all other components in the [[<tvar name=1>World</tvar>|World]]. Components with a higher value will update after components with a lower value.</translate>
|UpdateOrder|Int|<translate><!--T:9--> Controls the order in which this component updates, relative to all other components in the [[<tvar name=1>World</tvar>|World]]. Components with a higher value will update after components with a lower value.</translate>


<translate>Note that many components do not implement their functionality via the common updating system. This field has no effect on such components.</translate>
<translate><!--T:10--> Note that many components do not implement their functionality via the common updating system. This field has no effect on such components.</translate>
|Enabled|Bool|<translate>Controls whether this component this component is "enabled". Generally, components that are disabled (this field set to <code>false</code>) should do nothing.</translate>
|Enabled|Bool|<translate><!--T:11--> Controls whether this component this component is "enabled". Generally, components that are disabled (this field set to <code>false</code>) should do nothing.</translate>


<translate>Note that not all components respect this property. This field has no effect on such components.</translate>
<translate><!--T:12--> Note that not all components respect this property. This field has no effect on such components.</translate>
}}
}}
== <translate>Working With Components</translate> ==
== <translate><!--T:13--> Working With Components</translate> ==


=== <translate>With the Scene Inspector</translate> ===
=== <translate><!--T:14--> With the Scene Inspector</translate> ===


<translate>As a user, components are primarily manipulated through the [[<tvar name=1>Scene Inspector</tvar>|Scene Inspector]]. It allows you to create and destroy components and manipulate their fields. Many components also have custom functionality (commonly through various buttons) available in the inspector interface. See the [[<tvar name=1>Scene Inspector</tvar>|Scene Inspector]] page for how to operate it.</translate>
<translate><!--T:15--> As a user, components are primarily manipulated through the [[<tvar name=1>Scene Inspector</tvar>|Scene Inspector]]. It allows you to create and destroy components and manipulate their fields. Many components also have custom functionality (commonly through various buttons) available in the inspector interface. See the [[<tvar name=1>Scene Inspector</tvar>|Scene Inspector]] page for how to operate it.</translate>


=== <translate>With ProtoFlux</translate> ===
=== <translate><!--T:16--> With ProtoFlux</translate> ===


<translate>[[ProtoFlux]] currently has limited ability to directly interact with components.<ref><tvar name=1>{{CiteResoniteIssue|57|A way to use components on Protoflux}}</tvar></ref> It is not possible to dynamically create, destroy or locate components in slots.</translate>
<translate><!--T:17--> [[ProtoFlux]] currently has limited ability to directly interact with components.<ref><tvar name=1>{{CiteResoniteIssue|57|A way to use components on Protoflux}}</tvar></ref> It is not possible to dynamically create, destroy or locate components in slots.</translate>


== <translate>References</translate> ==
== <translate><!--T:18--> References</translate> ==

Revision as of 07:38, 20 May 2024

A Component is something that is attached to a Slot to add functionality. Without components, slots would be nothing but points in a void. They are behind almost every feature in Resonite, ranging from storing data to animating your avatar.

For a list of all components, see Category:Components. Components are organized in categories that match the game, so you can use the categories to figure out where to find a component.

Basic Properties

Fields

Components contain fields, store data on the component for configuration, internal operation and output. Pages on individual components go in-depth on each component and their fields.

All components include at least the following built-in fields:

Fields
Name Type Description
persistent Bool The persistent field determines whether this component will be saved, for example to the Inventory. If this field is set to false, the component will not be persisted when saved.
UpdateOrder Int Controls the order in which this component updates, relative to all other components in the World. Components with a higher value will update after components with a lower value.

Note that many components do not implement their functionality via the common updating system. This field has no effect on such components.

Enabled Bool Controls whether this component this component is "enabled". Generally, components that are disabled (this field set to false) should do nothing.

Note that not all components respect this property. This field has no effect on such components.

Working With Components

With the Scene Inspector

As a user, components are primarily manipulated through the Scene Inspector. It allows you to create and destroy components and manipulate their fields. Many components also have custom functionality (commonly through various buttons) available in the inspector interface. See the Scene Inspector page for how to operate it.

With ProtoFlux

ProtoFlux currently has limited ability to directly interact with components.[1] It is not possible to dynamically create, destroy or locate components in slots.

References