mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 14:17:51 +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);
|
EnabledToggle.Set(cached.Value.gameObject.activeSelf, false);
|
||||||
|
|
||||||
|
if (!cached.Value.parent)
|
||||||
|
SiblingIndex.GameObject.SetActive(false);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SiblingIndex.GameObject.SetActive(true);
|
||||||
if (!SiblingIndex.Component.isFocused)
|
if (!SiblingIndex.Component.isFocused)
|
||||||
SiblingIndex.Text = cached.Value.GetSiblingIndex().ToString();
|
SiblingIndex.Text = cached.Value.GetSiblingIndex().ToString();
|
||||||
|
}
|
||||||
|
|
||||||
int childCount = cached.Value.childCount;
|
int childCount = cached.Value.childCount;
|
||||||
if (childCount > 0)
|
if (childCount > 0)
|
||||||
@ -102,6 +108,8 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
{
|
{
|
||||||
NameButton.ButtonText.text = $"[Destroyed]";
|
NameButton.ButtonText.text = $"[Destroyed]";
|
||||||
NameButton.ButtonText.color = Color.red;
|
NameButton.ButtonText.color = Color.red;
|
||||||
|
|
||||||
|
SiblingIndex.GameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user