Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [ActiveIf] decorator #51

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from
Open

Add [ActiveIf] decorator #51

wants to merge 1 commit into from

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