From 48e162ebde9fc6ed1bd6eafe84cd3602648da6cd Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Fri, 17 Feb 2017 16:38:08 +0000 Subject: [PATCH] Added Editor Menu option for UI Grid Primitive --- Editor/UIExtensionsMenuOptions.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Editor/UIExtensionsMenuOptions.cs b/Editor/UIExtensionsMenuOptions.cs index e5d3d63..abc65db 100644 --- a/Editor/UIExtensionsMenuOptions.cs +++ b/Editor/UIExtensionsMenuOptions.cs @@ -1126,11 +1126,19 @@ namespace UnityEditor.UI go.AddComponent(); Selection.activeGameObject = go; } - #endregion - #region Re-Orderable Lists + [MenuItem("GameObject/UI/Extensions/Primitives/UI Grid Renderer", false)] + static public void AddUIGridRenderer(MenuCommand menuCommand) + { + GameObject go = CreateUIElementRoot("UI GridRenderer", menuCommand, s_ImageGUIElementSize); + go.AddComponent(); + Selection.activeGameObject = go; + } + #endregion - [MenuItem("GameObject/UI/Extensions/Re-orderable Lists/Re-orderable Vertical Scroll Rect", false)] + #region Re-Orderable Lists + + [MenuItem("GameObject/UI/Extensions/Re-orderable Lists/Re-orderable Vertical Scroll Rect", false)] static public void AddReorderableScrollRectVertical(MenuCommand menuCommand) { GameObject reorderableScrollRoot = CreateUIElementRoot("Re-orderable Vertical ScrollRect", menuCommand, s_ThickGUIElementSize);