Pending release
Documentation is a work in progress draft!
6.Scripting
All these functions have IntelliSense summaries, which can be viewed in your IDE, next to any overload variations. If necessary, each parameter is described there.
Quick Volume API
While working on a game you’ll often need to push effect overrides on the stack for time-based events or temporary states. This API provides the means to easily create new disposable volumes in the scene.
Volume volume = QuickVolume.Create(int layer, float priority, bool overrideAll, params VolumeComponent[] settings);
The last parameter takes an array or a list of effects you want to override in this volume.
Instancing a new effect is fairly straightforward. For instance, to create a Radial Blur effect and override its enabled & intensity fields:
var radialBlur = ScriptableObject.CreateInstance<RadialBlur>();
radialBlur.enabled.Override(true);
radialBlur.intensity.Override(1f);
QuickVolume.Destroy(volume); function when you don’t need it anymore.Creating effects
It is also possible to create an individual effect, which you can then control. Internally, this also uses the QuickVolume API.
RadialBlur radialBlur = PostProcessingComponent.Create<RadialBlur>(bool addRenderer = true, bool overriden = false, int layer = 0, int priority = 1);
You can then freely override and control parameters, most importantly the main “intensity” parameters:
radialBlur.intensity.Override(1);
You can reference the included SpeedLinesComponent component script, which creates and controls a SpeedLines effect based on the objects movement speed.
