导出代码工具更新
This commit is contained in:
@@ -36,12 +36,16 @@ public class UIComponentExportEditor : Editor
|
|||||||
List<string> uguiComponentNames = new List<string>();
|
List<string> uguiComponentNames = new List<string>();
|
||||||
if (prefab != null)
|
if (prefab != null)
|
||||||
{
|
{
|
||||||
var components = prefab.GetComponents<Component>();
|
|
||||||
uguiComponentNames = prefab.GetComponents<Component>()
|
uguiComponentNames = prefab.GetComponents<Component>()
|
||||||
.Where(c => c != null && UIViewExportEditor.IsUGUIComponent(c))
|
.Where(c => c != null && UIViewExportEditor.IsUGUIComponent(c))
|
||||||
.Select(c => c.GetType().Name)
|
.Select(c => c.GetType().Name)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
if (uguiComponentNames.Count == 0)
|
||||||
|
{
|
||||||
|
uguiComponentNames.Add("GameObject");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float lineHeight = EditorGUIUtility.singleLineHeight;
|
float lineHeight = EditorGUIUtility.singleLineHeight;
|
||||||
|
|||||||
@@ -48,12 +48,16 @@ public class UIViewExportEditor : Editor
|
|||||||
List<string> uguiComponentNames = new List<string>();
|
List<string> uguiComponentNames = new List<string>();
|
||||||
if (prefab != null)
|
if (prefab != null)
|
||||||
{
|
{
|
||||||
var components = prefab.GetComponents<Component>();
|
|
||||||
uguiComponentNames = prefab.GetComponents<Component>()
|
uguiComponentNames = prefab.GetComponents<Component>()
|
||||||
.Where(c => c != null && IsUGUIComponent(c))
|
.Where(c => c != null && IsUGUIComponent(c))
|
||||||
.Select(c => c.GetType().Name)
|
.Select(c => c.GetType().Name)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
if (uguiComponentNames.Count == 0)
|
||||||
|
{
|
||||||
|
uguiComponentNames.Add("GameObject");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float lineHeight = EditorGUIUtility.singleLineHeight;
|
float lineHeight = EditorGUIUtility.singleLineHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user