```
TestDestory[] testDestorys = (TestDestory[])Resources.FindObjectsOfTypeAll(typeof(TestDestory));
foreach (TestDestory testDestory in testDestorys)
{
if (testDestory.transform.parent != null)
{
continue;
}
if (testDestory.hideFlags == HideFlags.NotEditable || testDestory.hideFlags == HideFlags.HideAndDontSave)
{
continue;
}
if (Application.isEditor)
{
string sAssetPath = AssetDatabase.GetAssetPath(testDestory.transform.root.gameObject);
if (!string.IsNullOrEmpty(sAssetPath))
{
continue;
}
}
Debug.Log(testDestory.name);
}
```
网友评论