Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class CanvasGroupExtension
- {
- public static void SetActive(this CanvasGroup canvasGroup, bool isActive)
- {
- canvasGroup.alpha = isActive ? 1 : 0;
- canvasGroup.interactable = isActive;
- canvasGroup.blocksRaycasts = isActive;
- }
- public static bool Interactable(this CanvasGroup[] canvasGroups)
- {
- return canvasGroups != null && canvasGroups.Length > 0 && canvasGroups.All(x => x.interactable);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement