RemovePostProcessMaterial: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Removes a post process material that was previously added with AddPostProcessMaterial}} {{FuncSyntax|RemovePostProcessMate..." |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 27: | Line 27: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[SetPostEffect]] | |||
* [[AddPostProcessMaterial]] | |||
* [[RemovePostProcessMaterial]] |
Latest revision as of 19:04, 18 November 2019
Description
Removes a post process material that was previously added with AddPostProcessMaterial
Syntax
RemovePostProcessMaterial(SlotName)
Parameters
- SlotName
Name of the slot to remove. AddPostProcessMaterial.
Return Value
- Returns true on success.
Example
local added = false
function OnKeyPress(key)
if key == "J" then
added = not added
if added then
AddPostProcessMaterial("MyPPMaterial", UMaterialInterface.LoadFromAsset("/MyMod/Material/M_Cellshading"))
else
RemovePostProcessMaterial("MyPPMaterial")
end
end
end
AddEvent("OnKeyPress", OnKeyPress)