|OnSetupFromMeshRenderer:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the setup from mesh renderer button is touched.
}}
}}
Latest revision as of 20:23, 7 April 2025
This article or section is a stub. You can help the Resonite wiki by expanding it.
Material set allows for switching the list of materials being used on a mesh dynamically at any given moment. It also allows for lengthening or shortening the list in real time, which can be used to material stack (things to avoid).
Called when the setup from mesh renderer button is touched.
Usage
Attach this component to the same slot as a Mesh Renderer or a Skinned Mesh Renderer and hit the Setup From Mesh Renderer()sync delegate to attach it to the material list. Next add a list (SyncAssetList`1<Material>) of each material list to Sets you want to switch between. Lastly use ActiveSetIndex to switch between each list in Sets for Target.
Examples
Can be used to switch a material set on an avatar to make them change material types (toon to pbs metallic) or from active camo to not active camo, etc.