UI not showing when I right click on hierarchy!

You can also just reimport the Unity UI package, go into the Packages folder in the editor, right click in the Unity UI folder and click in reimport, then restart unity

Go to the “GameObject” at the top menu, You will find UI at the very bottom there.I hope it will help

Click on Assest and than Reimport all assest ,it will proberly solve the issue

Hi all . I have a work around . Firstly I tried the following solutions from this thread.
Restarting unity. No Joy.
Removing and re installing TextMeshPro and unity ui. No joy.
Reverting unity hub. Did not try.

Workaround:
For a text box or tmpro text box . Find your canvas in scene and right Click it. Create empty game object. Then in inspector just click ad component and find text, textmesh pro (ui) or whatever you need.
A little clunky , but it works .
Hope this helps someone until the issue is fixed.
Ps. Has anyone filed a bug report on this one?

Had the same issue. This solved it for me:

  1. Removed TextMeshPro Package
  2. Install TextMeshPro Package
  3. Quit Project
  4. Open Project

Hi,
I have now this problem after upgrading from 2020 to 2021.3.7f1: right click in the hierachy window does nothing and display an error in the console:

System.String.Substring (System.Int32 startIndex) (at <612a2c65aaf843d698f8d38b2ad7654a>:0)
UnityEditor.SceneHierarchy.AddCreateGameObjectItemsToMenu (UnityEditor.GenericMenu menu, UnityEngine.Object[] context, System.Boolean includeCreateEmptyChild, System.Boolean useCreateEmptyParentMenuItem, System.Boolean includeGameObjectInPath, System.Int32 targetSceneHandle, UnityEditor.MenuUtils+ContextMenuOrigin origin) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:882)
UnityEditor.SceneHierarchy.CreateGameObjectContextClick (UnityEditor.GenericMenu menu, System.Int32 contextClickedItemID) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:1300)
UnityEditor.SceneHierarchy.ItemContextClick (System.Int32 contextClickedItemID) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:1561)
UnityEditor.IMGUI.Controls.TreeViewController.HandleUnusedMouseEventsForItem (UnityEngine.Rect rect, UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:515)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:594)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:837)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:727)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:845)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:625)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:159)
UnityEditor.SceneHierarchyWindow.OnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:140)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /Users/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:448)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:387)
UnityEditor.DockArea.OldOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:378)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:372)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:693)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:665)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:658)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/IEventDispatchingStrategy.cs:113)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:35)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:26)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:19)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:419)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:468)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

If I uninstall TextMeshPro: right click works.
But the bug occurs again after reinstalling it.
I tried a lot of things (reimport all, delete library folder) but nothing works.
Any ideas?

EDIT:
After testing, it’s not TextMeshPro: when removing it, i got console errors (because some of my scripts use it) then right click works.
I have the same behavior if I remove In App Purchasing for example: I got error in my scripts but right click works.
Only when reinstalling packages so no more errors then right click does not work.
I think that Unity stops loading some stuff when errors linked to packages appear so right click works at this moment.

EDIT 2:
Finally, I found that an Editor script from on old asset was causing this strange bug.
No idea why. I found this Editor script when removing all my Unity assets one by one…

Perfect solution i have :-

Go to windows - then select package manager - then there is name like package: in project select it and change to unity registry , then search for text mesh pro and install it and unity UI also.

Just remove and reinstall textmesh pro for urp users

Your comment saved me after 2 hours of looking online. Thank you!

Go to WindowsPackage Manger → Switch to Unity Registry search for TextMeshPro and install it.

I don’t have it there, and i don’t have ANYTHING in package manager, and it also always shows me “error fetching package list” i can’t fix it

it says there is no thing like “TextMeshPro” or “Ui” what do i do (i have the recent version)