Component:MaterialRelay: Difference between revisions

From Resonite Wiki
add info
Added links
 
Line 6: Line 6:
|Name=Material Relay
|Name=Material Relay
}}
}}
The '''MaterialRelay''' component is used to specify to a [[Material Tool]] when hitting a slot what materials to grab/apply to when using the tool.
The '''MaterialRelay''' component is used to specify to a [[Material Tool]] when hitting a [[Slot|slot]] [[Tag|tagged]] with this component what materials to grab/apply to when using the tool.


<!--T:2-->
<!--T:2-->

Latest revision as of 22:59, 20 March 2025

Component image 
Material Relay component as seen in the Scene Inspector

The MaterialRelay component is used to specify to a Material Tool when hitting a slot tagged with this component what materials to grab/apply to when using the tool.

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.
MaterialRefs list of AssetRef`1<Material> A list of material storage fields that a material tool when applying should apply to. The first non null item in the list is the one a material tool will pick up when using the secondary action.

Usage

Attach to the root of an object and provide a list of material storage fields from, for example, Component:MeshRenderer or Component:SkinnedMeshRenderer to make Relays for.

Examples

Added to the root of new avatars made with the avatar creator.

See Also