wiki.sine.space | sinespace

Difference between revisions of "Scripting/SPostProcessVolume"

From wiki.sine.space
Jump to: navigation, search
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/spostprocessvolume")
 
Line 1: Line 1:
 
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/spostprocessvolume
==Members==
+
 
+
{{ScriptFunction|bool|Enabled|{get; set;}|Enable or disable post effect volume.|5=
+
volume = Space.Scene.Find("Main Camera").PostProcessVolume<br>
+
''--get post process volume from main camera.''<br>
+
volume = Space.Scene.Find(“Main Camera”).PostProcessVolume<br>
+
''--disable post process volume, post process should be disabled.''<br>
+
volume.Enabled = false|6=<pre>--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)</pre>
+
}}
+
 
+
{{ScriptFunction|bool|IsGlobal|{get; set;}|Should this volume be applied to the whole scene?|5=
+
volume = Space.Scene.Find("Main Camera").PostProcessVolume<br>
+
''--get post process volume from main camera.''<br>
+
''--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.''<br>
+
volume.IsGlobal = false
+
}}
+
 
+
 
+
{{ScriptFunction|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.|5=
+
volume = Space.Scene.Find("Main Camera").PostProcessVolume<br>
+
''--get post process volume from main camera.''<br>
+
volume.IsGlobal = false<br>
+
''--disable IsGlobal.''<br>
+
''--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.''<br>
+
volume.BlendDistance = 50
+
}}
+
 
+
{{ScriptFunction|float|Weight|{get; set;}|The total weight of this volume in the scene. 0 means it won't do anything, 1 means full effect.|5=
+
volume = Space.Scene.Find("Main Camera").PostProcessVolume<br>
+
''--get post process volume from main camera.''<br>
+
volume.Weight = 0.5<br>
+
''--set weight to 0.5, post effect should be weakened.''
+
}}
+
 
+
{{ScriptFunction|float|Priority|{get; set;}|The volume priority in the stack. Higher number means higher priority. Negative values are supported.|5=
+
volume = Space.Scene.Find("Main Camera").PostProcessVolume<br>
+
''--get post process volume from main camera.''<br>
+
volume.Priority = 2<br>
+
''--set priority to 2, if there are multiple post process volume, it would take effect.''
+
}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 06:16, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/spostprocessvolume