RemovePostProcessMaterial

From Onset Developer Wiki
Revision as of 12:08, 17 November 2019 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Removes a post process material that was previously added with AddPostProcessMaterial}} {{FuncSyntax|RemovePostProcessMate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
RemovePostProcessMaterial

Type: Function
Context: Client
Introduced: v1.0

Description

Removes a post process material that was previously added with AddPostProcessMaterial

Syntax

RemovePostProcessMaterial(SlotName)

Parameters

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)

See also

__EDIT_ME__