-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
In order to display feedback for options panels controlling the enabled state of LTCGI, I've had to modify the UdonAdaptor to cache the enabled state and provide a getter for it.
Here's what I've done:
private bool isGlobalStateEnabled = true;
public bool GlobalStateEnabled
{
get => isGlobalStateEnabled;
}
public void _SetGlobalState(bool enabled)
{
float fstate = enabled ? 1.0f : 0.0f;
GlobalShader.SetGlobalFloat(GlobalShader.PropertyToID("_Udon_LTCGI_GlobalEnable"), fstate);
isGlobalStateEnabled = enabled;
}
Super super simple, but helps a lot. If there's a better or different way to access this value I missed, let me know.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels