mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +08:00
safer UIRoot visibility check
This commit is contained in:
parent
f89455549e
commit
8ef6df043c
@ -12,8 +12,8 @@ namespace UnityExplorer.UI.Models
|
|||||||
|
|
||||||
public bool Visible
|
public bool Visible
|
||||||
{
|
{
|
||||||
get => UIRoot?.activeInHierarchy ?? false;
|
get => UIRoot && UIRoot.activeInHierarchy;
|
||||||
set => UIRoot?.SetActive(value);
|
set { if (UIRoot) UIRoot.SetActive(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void ConstructUI(GameObject parent);
|
public abstract void ConstructUI(GameObject parent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user