Fabric Manual How To'sHow to set parameters

How to set parameters

Set RTP Parameter

First you need to set an RTP parameter in the component

Set RTP Parameter

Then in code its possible to set the RTP parameter value using the name of the event and the parameter name like so,

if(Input.GetKeyDown(KeyCode.Alpha1)) 
{
	Fabric.EventManager.Instance.SetParameter("Event", "impact", 0.5f, gameObject);
}

 

Set Timeline Parameter

Set Timeline Parameter

 To set a timeline parameter in code,

if(Input.GetKeyDown(KeyCode.Alpha1)) 
{
	Fabric.EventManager.Instance.SetParameter("Event", "RPM", 0.5f, gameObject);
}

 

Set DSP Parameter

if(Input.GetKeyDown(KeyCode.Alpha6)) 
{
	Fabric.EventManager.Instance.SetDSPParameter("Event", Fabric.DSPType.LowPass, "CutoffFrequency", 5000, 5, 0.5f, gameObject);
}