Showing posts with label noob. Show all posts
Showing posts with label noob. Show all posts

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.

Tuesday, March 25, 2014

Unity3D mobile quicky noobie note.

So you are making something in Unity for mobile (lets say Android). You went ahead and selected your resolution in the preview window ("Game" window) And set your GUITextures with pixel inset values in the inspector. You might have even made a script that calculates things according to the screen resolution in X and Y to find ratios and what not. Then you deploy and you notice that something is off by a couple of pixels. You double check and things are ok but still get shifted in the screen.

So what gives? Well, Unity may have 1280*800 or other standard resolutions built in, but what the OS gives to the player once you actually have it running on the device is not exactly that. Remember it has the home bar. So that takes some pixels away from the real-estate, 28 pixels as far as I could tell in the case of 1280*800 screen resolution.

Just make a custom preview resolution of 1280*752 so you won't have to keep that in the back of your mind. I'm sure there are other a lot more elegant ways of solving this, this is the easiest thing I thought about.

Wednesday, December 25, 2013

2nd Maya/Unity quicky. (animating object with multiple individual meshes)

Have you tried to put your animated FBX from Maya and it would just go to 0,0,0 when you pressed play? (If you don't freeze the model before you export it, do so. Freeze it at 0,0,0 to save some extra trouble later on)

The reason for that is that most probably you have nested the meshes under a parent mesh in the Outliner panel and then on top, you've added keyframes to that parent. At least that was my problem when throwing it in Unity.
What you should do instead is select your meshes, group them, and then go in and add your keyframes and blend shapes. Export and your combined object won't crap itself in Unity.