Skip to content

Conversation

@EricHu33
Copy link

Similar to ShowIf, Active the GUI if certain property met the requirement.

Untitled video - Made with Clipchamp

code for above gif

 Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
        [SubToggle(SurfaceOptions, _AlphaClip)]_AlphaClip ("Alpha Clipping", Float) = 0.0
        [ActiveIf(_AlphaClip, Equal, 1)]_Cutoff ("Alpha Clipping Threshold", Range(0.0, 1.0)) = 0.5
        _Other ("_Other", Float) = 0.0
        [SubToggle(SurfaceOptions, _AnotherToggle)]_AnotherToggle ("Another Toggle", Float) = 0.0
        [ActiveIf(_AnotherToggle, Equal, 1)]_Other2 ("_Other2", Float) = 0.0
    }

@JasonMa0012
Copy link
Owner

I will not merge it for the time being, because the latest branch is 2.x, the data structure has been greatly changed, and there is a lot of redundancy in these codes. I will refactor it when I have time.

@EricHu33
Copy link
Author

I will not merge it for the time being, because the latest branch is 2.x, the data structure has been greatly changed, and there is a lot of redundancy in these codes. I will refactor it when I have time.

I understand :), I'll update to 2.x soon and see if I can propurse a better PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants