Creating a Toggle
We'll create a toggle for the Scale Grid with Avatar Size parameter.
A tutorial video is available for this guide:
Otherwise follow along with the documentaion:
First make sure you have VRCFury installed in your project.
Next, create a new object on your avatar and give it a name. Note that you can have multiple toggles on the same object, so this object is just here for organization.
Select this new object, click Add Component
in the Inspector
tab and find Toggle (VRCFury)
Next, name your toggle. This can be anything, including /
to create sub-menus. I'll name it Voxel/Scale Aware
which will create a Scale Aware
toggle in the Voxel
folder on my avatar's radial menu.
You can click on the Options
button to add the Saved Between Worlds
setting which will make the toggle persist between instance swaps. More information about the other options is available on VRCFury's documentation website.
Now we'll add the Material Property
action which will make the toggle change a property value.
We'll set it to Apply to all Renderers
which will change that specific material property on all renderers on your avatar. You might not always want this and if you don't you'll have to specify the renderer (skinned mesh renderer or mesh renderer) that you want the material property value to change on. Beware that material property changes on renderers will change the property on all materials of that renderer! More information about how to work around that can be found in the animated property documentation, specifically the renamed properties part.
Now all we have to do is specify the material property name and the value we want to swap it to.
We need to find the material property, set it to animated and copy its property name. Both of these can be done by finding your property in the material editor, right-clicking, and 1) click Set Animated
and Copy Property Name
. We can then put the property name into the Property
slot of the VRCFury material property toggle we just created.
And finally, we just need to set the value that the property will be set to. For our scale aware toggle, we want to turn it on so we'll set it to 1.
That's about it. You can use Gesture Manager or create a build & test version of your avatar to test this out in game now.