Created
November 6, 2018 06:38
-
-
Save brucevang/11857b100e147a8624dc57133e7ce94e to your computer and use it in GitHub Desktop.
Unity Set UI Active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void OpenPanel() { | |
/* This turns on a panel | |
if (Panel != null) { | |
Panel.SetActive(true); | |
} | |
*/ | |
// This toggles a panel | |
bool isActive = Panel.activeSelf; | |
Panel.SetActive(!isActive); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment