mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-23 01:59:40 +08:00
Hide SiblingIndex input when invalid
This commit is contained in:
parent
938a991594
commit
2b715f3dbe
@ -79,8 +79,14 @@ namespace UnityExplorer.UI.Widgets
|
||||
|
||||
EnabledToggle.Set(cached.Value.gameObject.activeSelf, false);
|
||||
|
||||
if (!SiblingIndex.Component.isFocused)
|
||||
SiblingIndex.Text = cached.Value.GetSiblingIndex().ToString();
|
||||
if (!cached.Value.parent)
|
||||
SiblingIndex.GameObject.SetActive(false);
|
||||
else
|
||||
{
|
||||
SiblingIndex.GameObject.SetActive(true);
|
||||
if (!SiblingIndex.Component.isFocused)
|
||||
SiblingIndex.Text = cached.Value.GetSiblingIndex().ToString();
|
||||
}
|
||||
|
||||
int childCount = cached.Value.childCount;
|
||||
if (childCount > 0)
|
||||
@ -102,6 +108,8 @@ namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
NameButton.ButtonText.text = $"[Destroyed]";
|
||||
NameButton.ButtonText.color = Color.red;
|
||||
|
||||
SiblingIndex.GameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user