private static void SelectInHierarchy(GameObject gameObject)
{
if (!s_Instance) return;
if (gameObject == s_Instance.m_SelectedLine && gameObject.activeInHierarchy) return;
if (EditorApplication.isPlayingOrWillChangePlaymode) return;
if (!gameObject.activeSelf)
{
selectedInHierarchy = true;
gameObject.SetActive(true);
}
var tests = TestComponent.FindAllTestsOnScene();
var skipList = gameObject.GetComponentsInChildren(typeof(TestComponent), true).ToList();
tests.RemoveAll(skipList.Contains);
foreach (var test in tests)
{
var enable = test.GetComponentsInChildren(typeof(TestComponent), true).Any(c => c.gameObject == gameObject);
if (test.gameObject.activeSelf != enable) test.gameObject.SetActive(enable);
}
}