Skip to reading
GUI Styling, Shaders & Effects

Return an element to a plain surface

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
Code example
extends "res://scripts/runtime/script_base.gd"
Code example
func run(_context: Dictionary = {}) -> Variant:
    var updates: Dictionary = {
        "shader": {},
        "metallicStrength": 0.0,
        "reflectionStrength": 0.0
    }
    for property_name: String in updates:
        await ChangeGUIElementProperty({
            "guiId": "style_lab",
            "elementId": "preview_art",
            "property": property_name,
            "value": updates[property_name]
        })
    return true

The explicit empty shader opts out of a legacy GUI-level fallback. The two finish values remove the separate shine controls. This does not clear ordinary background colors, borders, content images or hover-image assignments.

Use this as the start of a reduced-effects option, then also review moving GUI transitions and any other animated artwork. Removing a shader does not stop a video clip or an animated icon.

Keep a simple reset path while developing a heavily styled screen. It is much easier to find the cause of a problem when you can compare a known plain state.

Page 54 of 70Permalink
Go to page