wiki.sine.space | sinespace

Scripting/SPostProcessVolume

From wiki.sine.space
Revision as of 08:19, 31 December 2020 by Edisonwu (Talk | contribs) (Created page with " ==Members== {{ScriptFunction|bool|Enabled|{get; set;}|Enable or disable post effect volume.|5= volume = Space.Scene.Find("Main Camera").PostProcessVolume<br> ''--get post pr...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Members

Enabled

bool Enabled {get; set;}

Enable or disable post effect volume.

volume = Space.Scene.Find("Main Camera").PostProcessVolume

--get post process volume from main camera.
volume = Space.Scene.Find(“Main Camera”).PostProcessVolume
--disable post process volume, post process should be disabled.

volume.Enabled = false


IsGlobal

bool IsGlobal {get; set;}

Should this volume be applied to the whole scene?

volume = Space.Scene.Find("Main Camera").PostProcessVolume

--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.

volume.IsGlobal = false



BlendDistance

float BlendDistance {get; set;}

The outer distance to start blending from. A value of 0 means no blending and the volume overrides will be applied immediately upon entry.

volume = Space.Scene.Find("Main Camera").PostProcessVolume

--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.

volume.BlendDistance = 50


Weight

float Weight {get; set;}

The total weight of this volume in the scene. 0 means it won't do anything, 1 means full effect.

volume = Space.Scene.Find("Main Camera").PostProcessVolume

--get post process volume from main camera.
volume.Weight = 0.5

--set weight to 0.5, post effect should be weakened.


Priority

float Priority {get; set;}

The volume priority in the stack. Higher number means higher priority. Negative values are supported.

volume = Space.Scene.Find("Main Camera").PostProcessVolume

--get post process volume from main camera.
volume.Priority = 2

--set priority to 2, if there are multiple post process volume, it would take effect.