UIToggleObjectActiveWidget.cs 581 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. namespace Fort23.Mono
  3. {
  4. public class UIToggleObjectActiveWidget : UIToggleWidgetBasic
  5. {
  6. public GameObject showObj;
  7. public GameObject hindObj;
  8. public override void Show()
  9. {
  10. showObj.SetActive(true);
  11. // ReSharper disable once Unity.NoNullPropagation
  12. hindObj.SetActive(false);
  13. }
  14. public override void Hind()
  15. {
  16. showObj.SetActive(false);
  17. // ReSharper disable once Unity.NoNullPropagation
  18. hindObj?.SetActive(true);
  19. }
  20. }
  21. }