Mesh auto unhide when select another object
One way is with the Mask modifier:




In edit mode, select the part of the object you want to hide (or the inverse; the part you want to remain visible)
Create and assign a vertex group in Properties > Object Data
Add a mask modifier and specify the vertex group. Click the invert button if needed.