update
This commit is contained in:
parent
cc0cc71fb7
commit
68daaa4a1d
@ -27,8 +27,11 @@ public class UXCreateHelper : Editor
|
||||
|
||||
return type.GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static, null, types, null).Invoke(null, parameters);
|
||||
}
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXImage")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXImage")]
|
||||
#endif
|
||||
public static void CreateUXImage(MenuCommand menuCommand)
|
||||
{
|
||||
Type MenuOptionsType = typeof(UnityEditor.UI.ImageEditor).Assembly.GetType("UnityEditor.UI.MenuOptions");
|
||||
@ -40,8 +43,11 @@ public class UXCreateHelper : Editor
|
||||
image.material = AssetDatabase.LoadAssetAtPath<Material>(UXGUIConfig.UIDefaultMatPath);
|
||||
}
|
||||
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXToggle")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXToggle")]
|
||||
#endif
|
||||
public static void CreateUXToggle(MenuCommand menuCommand)
|
||||
{
|
||||
Type MenuOptionsType = typeof(UnityEditor.UI.SliderEditor).Assembly.GetType("UnityEditor.UI.MenuOptions");
|
||||
@ -56,7 +62,11 @@ public class UXCreateHelper : Editor
|
||||
|
||||
#if TEXTMESHPRO_SUPPORT
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXTextMeshPro")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXTextMeshPro")]
|
||||
#endif
|
||||
public static void CreateUXTextMeshPro(MenuCommand menuCommand)
|
||||
{
|
||||
Type MenuOptionsType = typeof(ImageEditor).Assembly.GetType("UnityEditor.UI.MenuOptions");
|
||||
@ -67,7 +77,11 @@ public class UXCreateHelper : Editor
|
||||
obj.AddComponent<UXTextMeshPro>();
|
||||
}
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXButton")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXButton")]
|
||||
#endif
|
||||
public static void CreateUXButton(MenuCommand menuCommand)
|
||||
{
|
||||
Type MenuOptionsType = typeof(TMPro_CreateObjectMenu).Assembly.GetType("TMPro.EditorUtilities.TMPro_CreateObjectMenu");
|
||||
@ -78,7 +92,11 @@ public class UXCreateHelper : Editor
|
||||
obj.AddComponent<UXButton>();
|
||||
}
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXInput Field")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXInput Field")]
|
||||
#endif
|
||||
public static void CreateUXInputField(MenuCommand menuCommand)
|
||||
{
|
||||
Type MenuOptionsType = typeof(TMPro_CreateObjectMenu).Assembly.GetType("TMPro.EditorUtilities.TMPro_CreateObjectMenu");
|
||||
@ -100,7 +118,11 @@ public class UXCreateHelper : Editor
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXScrollView")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXScrollView")]
|
||||
#endif
|
||||
public static void CreateUxRecyclerView()
|
||||
{
|
||||
GameObject selectionObject = Selection.activeGameObject;
|
||||
@ -113,7 +135,11 @@ public class UXCreateHelper : Editor
|
||||
Selection.activeGameObject = instance;
|
||||
}
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
[MenuItem("GameObject/UI/UXTemplateWindow")]
|
||||
#else
|
||||
[MenuItem("GameObject/UI (Canvas)/UXTemplateWindow")]
|
||||
#endif
|
||||
private static void CreateTemplateWindow()
|
||||
{
|
||||
GameObject selectionObject = Selection.activeGameObject;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user