Unity Tutorials/Scripting

It takes awhile to learn how to program functionality. What I thought I would do would be to provide some tutorials based on scripts and functionality that were needed inside the production of the game I build. What programming is, is to clearly define what you need done: firing, moving, AI, UI, spawning, life, death, etc. and then making it happen through a series of functions/methods. I started learning c# through Unity’s live training and tutorials on their site and then learned more on a problem by problem basis during production.

Hopefully these practical examples will help you out in your own game development.

Cross Fading Audio Tracks

This script was used to play background/ambient sounds for the game. We needed to draw from several different audio sources so the game’s background audio wasn’t repetitive.

Some of the topics used in the script are:

Audio Listener

Arrays

Lerp

Timers

Downloads

Non-Overlapping Spawning of Game Objects

This will demonstrate how to create a non-overlapping instantiation of game objects. This can be used for spawning enemies or other game objects that you would like randomly placed in a scene/game level.

Some of the topics used in the script are:

Overlap Sphere

Layer Masks

Visualization Gizmos

Downloads

Script(s) Only

Staggered Spawning of Game Objects

This will demonstrate how to create a non-overlapping instantiation of game objects. This can be used for spawning enemies or other game objects that you would like randomly placed in a scene/game level.

Some of the topics used in the script are:

Coroutines

WaitForSeconds

Visualization Gizmos

Downloads

Script(s) Only

3D Model Viewer

This is your basic model viewer. You can move, pan and orbit around a 3D model and you can also move to fixed camera positions around the 3D model

Some of the topics used in the script are:

Lerp

Arrays

Transform.LookAt

Downloads

Script(s) Only