We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71ac3c0 commit c48cdc2Copy full SHA for c48cdc2
Assets/Scripts/UI/UIPanel.cs
@@ -1,6 +1,9 @@
1
using System;
2
using System.Collections.Generic;
3
using UnityEngine;
4
+#if UNITY_EDITOR
5
+using UnityEditor;
6
+#endif
7
8
namespace FairyGUI
9
{
@@ -157,7 +160,13 @@ void CreateContainer()
157
160
158
161
GameObject go = t.GetChild(cnt - 1).gameObject;
159
162
if (go.name == "UI(AutoGenerated)")
163
+ {
164
+#if UNITY_2018_3_OR_NEWER
165
+ if (PrefabUtility.IsPartOfPrefabInstance(go))
166
+ PrefabUtility.UnpackPrefabInstance(PrefabUtility.GetOutermostPrefabInstanceRoot(gameObject), PrefabUnpackMode.Completely, InteractionMode.AutomatedAction);
167
168
UnityEngine.Object.DestroyImmediate(go);
169
+ }
170
cnt--;
171
}
172
0 commit comments