Enable or disable post effect volume.
--get post process volume from main camera.
volume = Space.Scene.Find(“Main Camera”).PostProcessVolume
--disable post process volume, post process should be disabled.
--clicking this object will Enable/Disable it's Post Process Volume component thisGameObject = Space.Host.ExecutingObject component = thisGameObject.PostProcessVolume OnClick = function() component.Enabled = not component.Enabled end thisGameObject.AddClickable() thisGameObject.Clickable.OnClick(OnClick)
Should this volume be applied to the whole scene?
--get post process volume from main camera.
--disable IsGlobal, this post process volume and the layer bound won't take effect if camera is not in the trigger post process volume bound to.
The outer distance to start blending from. A value of 0 means no blending and the volume overrides will be applied immediately upon entry.
--get post process volume from main camera.
volume.IsGlobal = false
--disable IsGlobal.
--set blend distance to 50, and if the camera is near to the trigger post process layer bound to it would take effection and blend this volume with blend distance.
The total weight of this volume in the scene. 0 means it won't do anything, 1 means full effect.
--get post process volume from main camera.
volume.Weight = 0.5
The volume priority in the stack. Higher number means higher priority. Negative values are supported.
--get post process volume from main camera.
volume.Priority = 2
|