In this Blender 2.5 video tutorial series we go through the process of preparing a model for export and use in Unity 3D, including correct naming conventions, animations, and creating empties to be used for tracking lights and other game objects. It will also cover some basic scripting and functionality within Unity 3d itself.
Part 2 covers the creation and editing of scripts in Unity 3D to play animations, track key inputs, a debug log, and copying locations and rotations of one game object to another.











your tutorials are great , thanks a lot , I hope to see some more advance game tutorials
Must have more Unity… I’m really liking these. Thanks!
You can count on it!
-Jonathan
Thanks for helping to demystify Unity – very cool!
Is there, perhaps, room for a UnityCookie in the family?
Just maybe
There’s a correction to be made here.
GetKeyUp and GetKeyDown have nothing to do with the up and down arrows. GetKeyUp fires when a key is released; GetKeyDown fires when a key is pressed.
You should use GetKeyDown for both. If you were to run this and hold Up Arrow, it probably wouldn’t start until you released the key.
@Jonas
This is exactly what I wanted, I didn’t want it to run until I released the key; so I guess it is just preference: I was going for more of a click activation then a press down activation but yeah it works both ways which is nice
@Andy Pace and everyone else without an icon
Thanks for your positive words; I enjoyed doing this tutorial and I hoped it helped.
You showed that the ‘var look’ can be accessed and edited in the side panel.
Couldn’t you apply that idea to the light scripts? Using a var to store which empty to attach the light too, making it possible to use the same script for both lights.
To improve this already nice tutorial I thought of splitting the door opening and the platform sliding animations and use a trigger to know when the platform is near the door. When it triggers you play the door open animation.
It would not be that hard to do and I think it would make it a lot more useful in a real game.
Thanks anyway for this great tutorial set which made me give Unity3D a try.
in the video you kept changing the editor tabs in unity, would be much faster to just change back to the editor and move from tab to tab when you just want to make quick edits. I have never used Unity and now because of you I am very much contemplating it so if that is just a force of habit opening scripts through Unity it is understandable.
Thank You for this great tut and I hope to someday decide to install and fire up unity but if you continue with such great tuts I do not foresee it taking much longer
You shouldn’t do GameObject.Find() lookups in the Update() function: it’s too expensive to do every frame.nnInstead (as Jimmy suggested)…nnvar Tracker : Transform;nvar Offset : Vector3;nfunction Update ()n{nTracker.transform.position = transform.position + Offset;n}nn…and attach this to something that move with the panel (the armature bone empty for example). Then in the inspector you can set the GameObject that should follow the panel and its offset. You can attach the same script multiple times.nnOr better yet, don’t use a script and just parent the lights like you would do in Blender… scripting a parent-child constraint is a bit overkill
.
Francesco, thanks that is really good to know. I can get around in code, but I am not what you would call a programmer. So good to know
I suppose that programmers are necessarily – pedantic.
Thanks for the great tute Porter, I really appreciate the effort you put into helping our blender-unity workflows, and would love to see more of these.
Keep up the great work!
Thanks Porter for a great tutorial.I hope that you make more Blender-Unity tutorials (maybe character animation?…). Will the “Low Poly Character Training Series” cover animating the character with scripts ?nnThanks again for the good work. You have a great teaching style.
Thanks a lot for your tutorial, this is helping me a lot !
Has the animation import process changed from unity 3.x to unity 4? (Probably because of the new mecanim system)
When I import something it comes with animations already, but they don’t work correctly.
What’s not working with the animations?
I started the animation from scratch in blender and changed a couple settings. It’s working properly now. I unticked the “all actions” in blender’s fbx export.
Also, in unity’s import settings I changed animation type from generic to legacy ( generation – store in root(new) ) in the rig tab.
hi jonathan .
i wark in blender game .i alwayz have the same problrms and i need ur help if u can .
___ok all my problems is about saving .when i save my game and i open it the next time i find that some animations desiper also sonds .and the bigg’s one is that the textur too but the object is save only this thins .so pleas i need ur help…
Well, In that case, you should use GetKeyUp on both cases.