Tanoda
PanelActuator.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using NaughtyAttributes;
4using UnityEngine;
5using UnityEngine.UI;
6
7public class PanelActuator : MonoBehaviour
8{
9 public static PanelActuator instance;
10
11 public GameObject PrefabPanel;
12
13 void Start()
14 {
15 instance = this;
16 }
17 [Button]
18 public void RefreshPanel()
19 {
20 StartCoroutine(blinker());
21 }
22
23 private IEnumerator blinker()
24 {
25 yield return null;
26 if(PrefabPanel && PrefabPanel.activeInHierarchy)
27 PrefabPanel.GetComponentInChildren<VerticalLayoutGroup>().enabled = false;
28 //PrefabPanel?.SetActive(false);
29 yield return null;
30 //PrefabPanel?.SetActive(true);
31 if (PrefabPanel && PrefabPanel.activeInHierarchy)
32 PrefabPanel.GetComponentInChildren<VerticalLayoutGroup>().enabled = true;
33 }
34}
UnityEngine.UI.Button Button
Definition: Pointer.cs:7
static PanelActuator instance
Definition: PanelActuator.cs:9
void RefreshPanel()
GameObject PrefabPanel