Menu options are still limited to 8 bit values when using unsynced expression parameters
Dor․
Unity Int and Float parameters are 32 bits in size, and VRChat does actually support higher-than-8-bit precision on float values between -1 to 1 assigned by the radial (as can be seen in the save files within LocalAvatarData) or other menu options (buttons, toggles) for the local user, regardless of parameter sync.
However the same does not hold true for float values below -1 or above 1, as well as int values below 0 or above 255, even when using unsynced parameters, which seems like an arbitrary limitation or simple oversight given that the full 32 bit types are still being allocated, they simply cannot be set by the menu.
Please allow menu options to specify 32 bit values when using unsynced parameters.
Log In
Dor․
Using the debug inspector and/or manually editing the asset file to change values outside of the clamping ranges without opening it again with the normal inspector (which would re-clamp the values) appears to work perfectly fine, using negative integer values or values exceeding 255 with an unsynced int parameter works without any issues, debug screen shows the parameter being updated to the specified value, toggles appear as active when the value matches, so this limitation is definitely an oversight.
I've taken the liberty of updating the menu editor script to respect unsynced parameters (which took less than a minute, probably against ToS but I'm doing your job for you ¯\_(ツ)_/¯):
- Open Packages/com.vrchat.avatars/Editor/VRCSDK/SDK3A/Components3/VRCExpressionMenuEditor.cs
- Change line 373 from
value.floatValue = EditorGUILayout.IntField("Value", Mathf.Clamp((int)value.floatValue, 0, 255));
to
value.floatValue = EditorGUILayout.IntField("Value", paramDef.networkSynced ? Mathf.Clamp((int)value.floatValue, 0, 255) : (int)value.floatValue);
and line 377 from
value.floatValue = EditorGUILayout.FloatField("Value", Mathf.Clamp(value.floatValue, -1f, 1f));
to
value.floatValue = EditorGUILayout.FloatField("Value", paramDef.networkSynced ? Mathf.Clamp(value.floatValue, -1f, 1f) : value.floatValue);
- Publish SDK update & mark the issue as resolved :)