Monday, June 8, 2015

Nooby Unity tip - why you need prefabs.

Some people will tell you to use prefabs for safety and some will tell you for convenience when assembling scenes. Both reasons are true and more than enough, but I like prefabs for one more reason.

It makes it really easy to select complex elements in your scene that are made out of multiple gameObjects. Even if you have a label on your complex element, it will only select the whole thing if you click on that label. But if it's a prefab, it will select the whole thing anyway instead of the individual gameObject that is right under the mouse pointer. If your complex element doesn't have a prefab connection, it will select the individual gameObject that is directly under the mouse pointer. Want to select a single object in your prefabbed element? Just click again. (Or just directly double click on that object in the first place.) Handy for moving things around the scene.


Left object has a prefab connection, right one doesn't. I'm only clicking once on them, both have labels. Click on the GIF for a better look.
Adventures of a Rubber Ball thread.

No comments:

Post a Comment