Selected object not highlighted in hierarchy pane

i am building a project which have pyramids and walls which means there are many cubes but when i select a cube it is not highlighted in the hierarchy pane so it becomes difficult to manage so many things without knowing which one is the one i selected

one another strange thing is if i try to open it from another user in my computer it highlights

It’s very old question so I think my answer may not help:
Disable the Lock button in Hierarchy tab.

I solve the problem through this action.

I had this same problem in Unity 5.3.x

Solution is:
Window → Layouts → Revert Factory Settings…

It seems like there's some issue with your configuration. You should probably contact UT about this, e.g. via the bug reporter. Be sure to include the relevant information and ask them for help.

Showing objects in the hierarchy pane certainly should work, as it does with your other user. So, the first thing I'd check if I was you is what the differences are between those two users (like, permissions, or some other settings). If you find anything special, that would also help UT a lot when you include that information in the bug report as well.

You find the bug reporter application in the menu: Help / Report a Bug.

Our team had find 3 different ways to solve this by our own. They don’t work for each of us, but maybe for you.

Option 1: Click the hierarchy with your mouse wheel. After that you should be able to click on the object to be highlighted in the hierachy
Option 2: Press ctrg+Z and after that ctrg+Y. This worked for one of us.
Option 3: Click something else in the hierachy. After that you should be able to click on your object in the scene and it should be highlighted in the hierarchy.

These aren’t longtime solutions, but it worked for us, to create a workflow for ourselves.