VRCShader.PropertyToID not working
tracked
RavenWorks
Using methods like Material.SetFloat and Material.SetColor works fine if you provide the string of the property name every time, but this is bad for performance.
Using VRCShader.PropertyToID to get an int ID in advance works fine in the Unity editor's play mode, but when building an actual world, it no longer works.
(Interestingly, when I try with a shader that uses a variable named "_Color" rather than "_MyColor", it DOES work -- is there a hardcoded list of permitted values or something?)
As a reminder, this is for things like SetColor
on a material
, NOT on VRCShader.SetGlobal, so the "_Udon" prefix requirement should not apply (as demonstrated by it not being required when using the string version of SetColor).Log In
This post was marked as
tracked