But they were having a strange problem.
All their 3d models were invisible!
I’ve noticed other folks running into the same issue, so here’s an intro to Layers, MiniMaps and a solution to the missing models mystery.
Learning about Layers and MiniMaps
Layers are commonly used by Cameras to render only a part of a scene, and by Lights to illuminate only parts of a scene. Layers can also be used by raycasting to selectively ignore colliders or to create collisions. You can learn all about Layers in the Unity3d documentation.
In a Jibe world, Layers are most commonly used to indicate which objects in a scene you want to appear on the MiniMap.
If an object in your scene has the “MiniMap” layer selected, then it will appear in the Minimap in the upper right part of your Jibe player screen.
Like this dragon object in my own Jibe world:
This nice little feature gives you the flexibility to decide which objects you want to have displayed in the MiniMap. For example, if I wanted the dragon to sneak up on folks and surprise them, I definitely wouldn‘t want it to appear in the MiniMap. 😉
The Mystery of the Missing Models
The person I was working with today had a strange problem. Whenever they dragged a mesh model from their Project folder into their Scene window, the 3d object was listed in the Hierarchy window and you could see the transform arrows sticking out of it. But the actual mesh geometry was invisible.
Even more strange, when the person ran a preview of the Jibe world in the Unity editor (Game view), everything appeared normally.
The solution to the mystery has to do with Layers. Look in the upper right part of your Unity3d editor for this button:
If a Layer has a check next to it, that means every object in that specific Layer will be rendered in your Scene view.
If a layer doesn’t have a check next to it, then every object in that specific Layer will be invisible in your Scene view.
To check or uncheck a Layer in this pulldown, you just click on it. And, unfortunately, as soon as you click on one, the pulldown immediately closes. There’s no UI feedback indicating you have just disabled the rendering of a Layer. You have to re-open the Layer button to notice the change.
Which means it’s real easy to not realize you’ve changed a check into an uncheck.
The person I was helping today had clicked on that Layers button then accidentally clicked on the “Default” Layer, causing it to be unchecked and not rendered. Which made every object in their Scene view invisible.
I googled around and noticed many other Unity3d beginners making this same exact mistake. So if this has happened to you, don’t feel bad. You’re not alone!
Speaking of Unity3d beginners, I highly recommend everyone read the Learning the Interface section of the Unity3d manual. It’s a lot of fun to learn all the ins and outs of the Unity editor’s interface. And the more you learn, the more comfortable you’ll feel using the editor.
-John “Pathfinder” Lester