修复Unity2018.3以下版本代码不兼容的问题

This commit is contained in:
monitor1394
2019-11-04 18:54:05 +08:00
parent cd4e990a47
commit 6b9e8e3898

View File

@@ -78,7 +78,7 @@ namespace XCharts
public static void DestroyAllChildren(Transform parent)
{
if (parent == null) return;
#if UNITY_EDITOR
#if UNITY_EDITOR && UNITY_2018_3_OR_NEWER
if (PrefabUtility.IsPartOfAnyPrefab(parent.gameObject))
{
return;