Unity Asset Pipeline, GameObjects and Components

Unity - Assets

Unity – Assets

In the previous article titled Introduction to Unity 3.5 I introduced the Unity interface and we created a simple project that shows a rotating cube. In this article, I want to introduce some basic Unity concepts such as the Asset pipeline and the GameObject-Component model and introduce a few of the Components that Unity provides. I will not go into too much detail about the different components in this article (I will dedicate a different article for each of the more complex components such as Terrain, Particle Effects, Physics, Audio, and Scripts).

 

Importing Assets

Unity has probably the most comprehensive support for different asset types that you would want to use in your game. Unity has native (built-in) support for many file formats for model files, texture files, audio files, video files, and text files as can be seen from the table below:

Type External Package Extension Requirements
3D Model Maya .ma & .mb Must have Maya 8.0 or newer installed.
3D Studio Max .max Must have 3D Studio Max installed.
Cheetah3D .jas Must have Cheetah3D 2.6 or newer installed.
Cinema 4D .c4d Must have Cinema 4D 8.5 or newer installed.
Modo .lxo Must have Modo 501 or newer installed.
Lightwave .fbx Models must be exported to FBX format.
Blender .blend Must have Blender 2.45-2.49 or 2.58 or newer (versions 2.50-2.57 broke the FBX exporter in Blender).
COLLADA .dae Natively supported by Unity.
Autodesk FBX .fbx Natively supported by Unity.
Wavefront .obj Natively supported by Unity.
3D Studio .3ds Natively supported by Unity.
Drawing Interchange .dfx Natively supported by Unity.
Texture Photoshop .psd Natively supported by Unity.
Other Image Formats .jpg, .png, gif, .bmp, .tga, .iff, .pict, .dds, and more… Natively supported by Unity.
Audio MP3 .mp3 Natively supported by Unity.
Ogg Vorbis .ogg Natively supported by Unity.
Other Audio Formats .aiff, .wav, .mod, .it, .sm3, and more… Natively supported by Unity.
Video Video Formats .mov, .avi, .asf, .mpg, .mpeg, .mp4 Video files are transcoded by Unity.
Text Text File Formats .txt, .htm, .html, .xml, .bytes Text files are not converted.

[Source]

In most cases, you can simply drop the game asset in the Assets folder in your game project and Unity will automatically import it into the editor.

Models

Unity has native support for some model formats that do not require 3rd-party tools to be installed. The formats include Autodesk FBX (.FBX), Collada (.DAE), Autodesk 3D Studio (.3DS), AutoCAD Drawing Exchange Format (.DXF), and Wavefront Geometry Object File (.OBJ). Any modeling package that export export (or work directly with) one of these model formats can be natively supported by Unity’s built-in model importers.

Some file formats however require 3rd-party software to be installed before Unity will be able to import those files. These file formats include Autodesk 3ds Max and Maya (.max, .ma, .mb), Maxon Cinema4D (.c4d), Cheetah3D (.jas), Modo (.lxo), and Blender (.blend).

Autodesk 3ds Max

Autodesk 3ds Max Icon

Autodesk 3ds Max Icon


Unity can import 3ds Max files (.max) as long as you have Autodesk’s 3ds Max software installed.

Unity will import the following information from the 3ds Max files [source]:

  • All nodes with position, rotation, and scale. Pivot points and names are also imported.
  • Meshes with vertex colors, normals and one or two UV sets.
  • Materials with diffuse texture and color. Multiple materials per mesh.
  • Animations
  • Bone based animations

[Source]

Autodesk Maya

Autodesk Maya Icon

Autodesk Maya Icon

Unity will import Maya model files (.ma, .mb) as long as you have Autodesk’s Maya software installed.

Unity will import the following information from the Maya files [source]:

  • All nodes with position, rotation and scale. Pivot points and Names are also imported.
  • Meshes with vertex colors, normals and up to 2 UV sets.
  • Materials with Texture and diffuse color. Multiple materials per mesh.
  • Animations FK & IK.
  • Bone-based animations.

Unity will not import blend shapes. Use bone-based animation instead.

[Source]

Cinema 4D

Cinema4D Icon

Cinema4D Icon


Unity will import Maxon Cinema 4D (.c4d) files as long as you have the Maxon Cinema 4D software installed.

Unity will import the following information from the Cinema 4D model files [source]:

  • All objects with position, rotation and scale. Pivot points and Names are also imported.
  • Meshes with UVs and normals.
  • Materials with Texture and diffuse color. Multiple materials per mesh.
  • Animations FK (IK needs to be manually baked).
  • Bone-based animations.

Unity does not support Point Level Animations (PLA). Use bone-based animations instead.

[Source]

Cheetah3D

Cheetah3D Logo

Cheetah3D Logo

Unity will import Cheetah3D (.jas) files as long as you have the Cheetah3D software installed.

Unity will import the following information from a Cheetah3D file [source]:

  • All nodes with position, rotation and scale. Pivot points and Names are also imported.
  • Meshes with vertices, polygons, triangles, UV’s and Normals.
  • Animations.
  • Materials with diffuse color and textures.

[Source]

Modo

Luxology Modo Icon

Luxology Modo Icon

Unity will import Modo model files as long as you have the Modo 501 or newer software installed.

Unity will import the following information [source]:

  • All nodes with position, rotation and scale. Pivot points and names are also imported.
  • Meshes with vertices, normals and UVs.
  • Materials with Texture and diffuse color. Multiple materials per mesh.
  • Animations.

[Source]

Blender

Blender Icon

Blender Icon

Unity will automatically import Blender (.blend) files as long as you have Blender 2.58 or later installed.

Unity will import the following information [source]:

  • All nodes with position, rotation and scale. Pivot points and Names are also imported.
  • Meshes with vertices, polygons, triangles, UVs, and normals.
  • Bones.
  • Skinned Meshes.
  • Animations.

[Source]

Import Settings

The Import Settings will be displayed in the Inspector view when a Mesh asset is selected in the Project view.

Unity - Model Import Settings

Unity – Model Import Settings

[Source]

Scale Factor

Generally, Unity prefers the world scale of 1 unit per meter as this is the natural units to be used by the physics system. However, an artist may want to work in a different scale (say 1 cm per world unit, or 1 inch per world unit).

Use the Scale Factor import setting to control how Unity will scale the imported mesh.

Mesh Compression

If you are concerned about the files size of the imported meshes (for example, your models will be used on mobile platforms), you can enable mesh compression. There are 4 levels of mesh compression:

  • Off: No mesh compression occurs, models are stored with all data intact.
  • Low: Some compression occurs. No artifacts should occur.
  • Medium: More compression occurs. Some artifacts may occur.
  • High: High compression. May cause artifacts in the compressed mesh.

A general rule of thumb is to use the highest level of compression as long as no visible artifacts occur.

Optimize Mesh

With the Optimize Mesh option enabled, Unity will reorganize the vertices in the mesh for optimized rendering.

Generate Colliders

With the Generate Colliders option enabled, Unity will generate a Mesh Collider component during mesh import.

This option should only be specified on static objects (objects that will not be moved very often).

Swap UVs

This option will swap the primary and secondary UV channels. This is useful if the lightmap and the diffuse UV channels are not correct during import.

Generate Lightmap UVs

For static objects that will not be moving very often, it might be useful to disable dynamic lights on those objects and only apply a static (pre rendered) lightmap. Unity can generate a set of UVs that can be used to apply a static lightmap texture to the model.

This option should be disabled for objects that will be moving in the scene and will not have a lightmap applied to them.

Normals

Unity can generate surface normals for models if the original model does not define them.

Usually you will want to Import the normals that are already on the mesh.

Surface normals are only needed on models that will be dynamically lit at run-time. Static models that will only have lightmaps applied to them do not need to have surface normals and setting this option to None can reduce the size of the imported model.

Tangents

Tangent vectors are needed only on models that have normal maps applied to them. For models that will not use normal maps it is best to disable this setting to reduce the size of the imported model.

Smoothing Angle

The Smoothing Angle slider becomes active if you specify Calculate for the Normals setting.

This value will smooth vertex normals by averaging the vertex normals of neighboring vertices as long as edge between the vertices is less than the value of Smoothing Angle. Edges whose angle is greater than this value will appear sharp.

This parameter is measured in degrees.

Split Tangents

Enable the Split Tangents option if normal map lighting is broken by seams on your mesh.

Import Materials

Disable the Import Materials option if you don’t want Unity to generate materials for your models. Disabling this option after the model has been initially imported will not delete the material that were previously generated.

If this option is disabled, Unity will apply the default-diffuse material instead.

Material Naming

This option is only available if the Import Materials option is enabled.

This setting determines how generated materials are named.

  • By Base Texture Name: The name of the texture that is applied to the primary (diffuse) texture stage is used to name the generated material in Unity.
  • From Model’s Material: The material name that is applied to the imported mesh will be used to name the generated material in Unity.
  • Model Name + Model’s Material: The model’s original file name and the mesh’s material name will be combined to produce the generated material’s file name. This option is useful to reduce name clashing if you have many models with the same material names applied to them.

Material Search

The Material Search option controls how Unity will search for a material in the project.

  • Local: Unity will only look for a material that matches this model in the folder called Materials that exists in the same directory as the model itself.
  • Recursive-Up: Unity will look for a material for this model first in the local folder and continually search parent directory’s Materials folders until it finds a matching material.
  • Project-Wide: Unity will search every folder in the project for a matching material.

If Unity does not find a matching material file for the current model’s meshes, then it will generate a new material file in a folder called “Materials” at the same level as the model file itself using the naming convention specified.

Animations – Generation

Controls how animations are imported.

  • Don’t Import: No animations or skinning information is imported.
  • Store in Original Roots: Animations are stored in the root objects of your animation package. These may be different that the root node of the imported model if the original model file contains several animated meshes.
  • Store in Nodes: Animations are stored together with the objects they animate. Use this setting if you have a complex animation setup and want full scripting control.
  • Store in Root: The animations are stored in the model’s root node. This is used for animations with a hierarchy (such as a skeletal animated character).

Bake Animations

If your animation contains inverse-kinematics (IK) or simulation in your animation package, Unity will convert it to forward-kinematics (FK) on import. This option is only available for Maya, 3ds Max, and Cinema4D model files.

Animation Wrap Mode

The Animation Wrap Mode drop-down box allows you to select the default wrap mode for imported animations.

The different options are:

  • Default: Uses the wrap-mode specified in the Animation split options (described below).
  • Once: The animation is played through once and then stops.
  • Loop: The animation will restart automatically after it has reached the last frame.
  • PingPong: The animation will play in reverse after it has reached the last frame, then play forward after it has reached the first frame again, and then repeat. This is useful for pendulum or oscillating animations.
  • Clamp Forever: The animation is played through once but the last frame is repeated indefinitely.

Split Animations

If you have multiple animations described in a single animation sequence, you can split the different animations into multiple animation clips.

Each animation clip defines the following properties:

  • Name: The name that identifies the animation clip. This name is used to play the animation clip in scripts.
  • Start: The first frame in the main sequence for this clip.
  • End: The last frame in the main sequence for this clip.
  • WrapMode: The wrap mode for this clip. Wrap modes were described above.
  • Loop: Depending on how the animation was created, one extra frame of animation may be required for the split clip to loop properly. If your looping animation doesn’t look correct, try enabling this option

Animation Compression

The Animation Compression drop-down box allows Unity to reduce the number of keyframes needed to represent the animation.

The options are:

  • Off: No compression or reduction of keyframes occurs.
  • Keyframe Reduction: Unity will try to reduce the required number of keyframes during import. Unity will use the Animation Compression Errors options listed below to determine which keyframes are eliminated.
  • Keyframe Reduction and Compression: This is the same as Keyframe Reduction but also compresses the animation data stored on disk. This option does not effect the run-time memory requirements.

Animation Compression Errors

These options determine how Unity performs the keyframe reduction.

  • Rotation Error: Defines the maximum angle deviation allowed in degrees. Rotation keyframes with an angular deviation less than this are allowed to be removed.
  • Position Error: Defines the maximum change in distance between keyframes that are allowed to be removed.
  • Scale Error: Defines the maximum delta deviation allowed in a scale keyframe for that keyframe to be considered for reduction.

Textures

Unity has native support for almost all texture image formats.

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • BMP (.bmp)
  • TGA (.tga, .tpic)
  • PICT (.pict, .pct, .pic)
  • PSD (.psd) Adobe PhotoShop Document Format. Visible layers will be compressed and merged.
  • And more…

Textures will be imported automatically by Unity and converted to an optimized texture format based on the settings in the Texture Importer. Unity even supports multi-layered Phtoshop and TIFF files. Visible layers will be automatically flattened on import. You can make changes to these file in your favorite image editor and the modified files will be automatically re-imported and you will be able to see the modifications instantly in the Unity editor.

Import Settings

Selecting an image in the Project view will allow you to adjust the import settings for that image.

There are several different texture types and each type has a different set of input options.

  • Texture: This is the most common texture type and it is generally used for textures that will be mapped to 3D models or animated characters.
  • Normal Map: This is a special form of the Texture type. It is used to import a texture that will be used to define the surface normals across the faces of a 3D model.
  • GUI: This texture type should be used on images that will be used for HUD or GUI elements (like menus or on-screen displays).
  • Reflection: This texture type should be applied to images that represent a reflection map (also known as a cube map or environment map).
  • Cookie: This texture type should be applied to images of cookies. Just kidding. A light cookie is applied to dynamic lights in the scene and can be used to modify the shape (or pattern) of the light.
  • Advanced: This type allows you to have more precise control over how your texture is imported.

[Source]

Texture

The Texture type provides the most common set of import options.

Unity - Texture Import Settings (Texture)

Unity – Texture Import Settings (Texture)

  • Alpha from Grayscale: Enabling this option will tell Unity to create an alpha channel for the imported texture based on the image’s grayscale value at each pixel.
  • Wrap Mode: Specifies how to handle out-of-range texture coordinates with this texture.
    • Repeat: The texture will be tiled.
    • Clamp: The edges of the texture will be stretched infinently across the face of the polygon.
  • Filter Mode: Specifies how the pixels of the texture are blended when the texture is stretched or shrunk.
    • Point: The closets pixel in the texture to the one being sampled is used. This results in blocky textures when viewed up-close but can improve performance.
    • Bilinear: Neighboring pixels in the texture relative to the pixel being sampled are blended together based on distance to the sampled point. This results in blurry pixels when viewed up-close.
    • Trilinear: Same as Bilinear but also blends the results from neighboring mip-map levels.
  • Aniso Level: This setting determines the level of anisotropic filtering that is applied when sampling this texture. Higher levels of filtering will produce better results but will be more GPU intensive. This setting should only be applied to textures that will be used for floors, roads, or the ground where the player will be viewing the texture from a sharp angle.

[Source]

Normal Map

The Normal Map texture type should be applied to standard normal maps or bump maps that Unity can convert to normal maps during import.

Unity - Texture Import Settings (Normal Maps)

Unity – Texture Import Settings (Normal Maps)

  • Create from Grayscale: Select this option if you want to convert a grayscale image to a normal map. The grayscale images are also called bump maps. White areas of the image represent elevated parts of the texture and normals will be computed based on the differences of neighboring pixels in the image.
    • Bumpiness: This value controls how pronounced the changes in elevation will be. A value of 0 will produce a flat surface (no change in surface normal) and a value of 0.3 will generate very pronounced surface normals.
    • Filtering: Determines how the normals are generated.
      • Smooth: The normal map will appear smoothed.
      • Sharp: The edges of the normal map will appear quite sharp. This might be useful for non-organic surface normals.

The last three settings (Wrap Mode, Filter Mode, and Aniso Level) are the same as for Texture type.

[Source]

GUI

The GUI texture type should be applied to on-screen GUI or HUD elements. Unity will not scale non-power-of-two texture nor will it generate mip maps for GUI textures.

Unity - Texture Import Settings (GUI)

Unity – Texture Import Settings (GUI)

The only setting this texture type has is Filter Mode which is the same for the standard texture types.

[Source]

Reflection

The Reflection texture type is used to generate a reflection map (also known as an environment map or cube map).

Unity - Texture Import Settings (Reflection)

Unity – Texture Import Settings (Reflection)

Unity can generate a reflection map texture from a simple 2D texture. Selecting the Reflection texture type will provide the Mapping option that specifies how the reflection map should be generated.

  • Sphere mapped: Maps the texture onto a sphere shape. Useful for generating environmental reflection maps.
  • Cylindrical: Maps the texture to a cylinder shape. Useful for generating reflection maps that will be used on cylindrical shaped objects.
  • Simple Sphere: Maps the texture to a sphere and the texture is deformed when rotated. This is useful if the original texture does not tile.
  • Nice Sphere: Maps the texture to a sphere but maintains the original texture’s wrap mode. Useful for textures that can be tiled.

[Source]

Cookie

A Cookie texture can be applied to a light component and will determine the shape of the light as it illuminates objects in the scene. This is similar to a “cookie cutout” that is placed in front of the light to change the shape of the projected light. This technique is typically used in films to achieve a desired lighting effect.

Unity - Texture Import Settings (Cookie)

Unity – Texture Import Settings (Cookie)

The Light Type property can be Spotlight, Directional Light, and Point Light.

  • Spotlight: For Spotlight light types the cookie texture will be clamped so it’s a good idea to use a texture with a black.
  • Directoinal: For Directional light types, the cookie texture will be tiled. In this case, you want to use a texture that can be tiled without seams. This is useful for creating a rolling cloud effect in your outdoor scenes.
  • Point: For Point lights Unity will create a texture similar to a Reflection texture that can be used to mask the lighting from an omni-directional light source. Selecting this option will make the Mapping option available. The Mapping option is the same as for the Reflection texture types.

The Alpha from Grayscale, Filter Mode, and Aniso Level settings are the same as for the standard Texture type.

[Source]

Lightmaps

Select the Lightmap texture type if the texture will be applied to objects for static lighting.

Unity - Texture Import Settings (Lightmap)

Unity – Texture Import Settings (Lightmap)

The Filter Mode and Aniso Level settings are the same for the standard Texture type.

[Source]

Advanced

The Advanced texture type allows you to configure all of the texture import settings manually.

Unity - Texture Import Settings (Advanced)

Unity – Texture Import Settings (Advanced)

  • Non Power of 2: If texture has non-power-of-two size, this will define a scaling behavior at import time.
    • None: Texture will be padded to the next larger power-of-two size for use with GUITexture component.
    • To nearest: Texture will be scaled to the nearest power-of-two size at import time. For instance 257×511 texture will become 256×512.
    • To larger: Texture will be scaled to the next larger power-of-two size at import time. For instance 257×511 texture will become 512×512.
    • To smaller: Texture will be scaled to the next smaller power-of-two size at import time. For instance 257×511 texture will become 256×256.
  • Generate Cube Map: Generates a cubemap from the texture using different generation methods.
  • Read/Write Enabled: Select this to enable access to the texture data from scripts (GetPixels, SetPixels and other Texture2D functions). Note however that a copy of the texture data will be made, doubling the amount of memory required for texture asset. Use only if absolutely necessary. This is only valid for uncompressed and DTX compressed textures, other types of compressed textures cannot be read from.
  • Import Type: Specify the type of import to apply to this texture.
    • Default: Standard texture type. Use this for 2D textures and GUI texture types. Selecting this option will make two other options available.
      • Alpha from Grayscale: Enabling this option will tell Unity to create an alpha channel for the imported texture based on the image’s grayscale value at each pixel.
      • Bypass sRGB Sampling: Texture will not be converted from gamma space to linear space when sampled. Enable this option for GUI textures and look-up textures.
    • Normal Map:
      • Create from Grayscale: Enable this to turn the color channels into a format suitable for normal mapping.
        • Bumpiness: Control the amount of bumpiness.
        • Filtering: Determine how the bumpiness is calculated.
          • Sharp: Also known as a Sobel filter. this generates normal maps that are sharper than Standard.
          • Smooth: This generates normal maps that are quite smooth.
    • Lightmap: Select this if you want to use the texture as a lightmap.
  • Generate Mip Maps: Select this to enable mip-map generation. Mip maps are smaller versions of the texture that get used when the texture is very small on screen.
  • Correct Gamma: Select this to enable per-mip-level gamma correction.
  • Border Mip Maps: Select this to avoid colors seeping out to the edge of the lower Mip levels. Used for light cookies.
  • Mip Map Filtering: Two ways of mip map filtering are available to optimize image quality.
    • Box: The simplest way to fade out the mipmaps – the mip levels become smoother and smoother as they go down in size.
    • Kaiser: A sharpening Kaiser algorithm is run on the mip maps as they go down in size. If your textures are too blurry in the distance, try this option.
  • Fade Out Mips: Enable this to make the mipmaps fade to gray as the mip levels progress. This is used for detail maps.
    • Fade Range: The left most scroll is the first mip level to begin fading out at. The rightmost scroll defines the mip level where the texture is completely grayed out.
  • Wrap Mode: Specifies how to handle out-of-range texture coordinates with this texture.
    • Repeat: The texture will be tiled.
    • Clamp: The edges of the texture will be stretched infinently across the face of the polygon.
  • Filter Mode: Specifies how the pixels of the texture are blended when the texture is stretched or shrunk.
    • Point: The closets pixel in the texture to the one being sampled is used. This results in blocky textures when viewed up-close but can improve performance.
    • Bilinear: Neighboring pixels in the texture relative to the pixel being sampled are blended together based on distance to the sampled point. This results in blurry pixels when viewed up-close.
    • Trilinear: Same as Bilinear but also blends the results from neighboring mip-map levels.
  • Aniso Level: This setting determines the level of anisotropic filtering that is applied when sampling this texture. Higher levels of filtering will produce better results but will be more GPU intensive. This setting should only be applied to textures that will be used for floors, roads, or the ground where the player will be viewing the texture from a sharp angle.

[Source]

Audio

Unity has native support for many different audio formats. Unity supports .aif, .wav, .mp3, and .ogg.

When you place an audio file somewhere in the Asset directory of your Unity game project, Unity will automatically import the audio file. Audio files can be imported in one of two formats.

  • Native: Uses the file’s native file format. In this case, the file will not be compressed. Use this for pre-compressed ambient audio files (already in MP3 or OGG compressed format) or if it is a small 1-shot sound effect. Using this format, the file size on disk will be larger but the audio file will not need to be decoded at runtime before it can be played.
  • Compressed: This will produce smaller audio files on disk but the file will need to be decompressed at runtime. Unity will choose the compression algorithm based on the platform the game is being built for. Audio files will be compressed using the Ogg Vorbis CODEC when targeting stand-alone PC or MAC or consoles (XBox360, PS3) or the MP3 CODEC will be used when targeting mobile platforms (Android, iOS, Web).

Audio files are stored as AudioClips in the Asset folder. AudioClips cannot be played directly but must be used in conjuction with an AudioSource component attached to a GameObject in the scene. Before the sound can be heard, there must also be one active AudioListener component which is usually attached to the main camera in the scene.

The AudioClip is simply the container for the audio data that is used by the AudioSource component. Selecting the audio file in the project view will show the import settings for that audio file in the Inspector view.

Unity - Audio Import Settings

Unity – Audio Import Settings

  • Audio Format: The specific format that will be used for the sound at runtime.
    • Native: This option offers higher quality at the expense of larger file size and is best for very short sound effects.
    • Compressed: The compression results in smaller files but with somewhat lower quality compared to native audio. This format is best for medium length sound effects and music.
  • 3D Sound: If enabled, the sound will play back in 3D space. Both Mono and Stereo sounds can be played in 3D.
  • Force to mono: If enabled, the audio clip will be down-mixed to a single channel sound.
  • Load Type: The method Unity uses to load audio assets at runtime.
    • Decompress on load: Audio files will be decompressed as soon as they are loaded. Use this option for smaller compressed sounds to avoid the performance overhead of decompressing on the fly. Be aware that decompressing sounds on load will use about ten times more memory than keeping them compressed, so don’t use this option for large files.
    • Compressed in memory: Keep sounds compressed in memory and decompress while playing. This option has a slight performance overhead (especially for Ogg/Vorbis compressed files) so only use it for bigger files where decompression on load would use a prohibitive amount of memory.
    • Stream from disc: Stream audio data directly from disc. The memory used by this option is typically a small fraction of the file size, so it is very useful for music or other very long tracks. For performance reasons, it is usually advisable to stream only one or two files from disc at a time but the number of streams that can comfortably be handled depends on the hardware.
  • Hardware Decoding: (iOS only) On iOS devices, Apple’s hardware decoder can be used resulting in lower CPU overhead during decompression.
  • Gapless looping: (Android/iOS only) Use this when compressing a seamless looping audio source file (in a non-compressed PCM format) to ensure perfect continuity is preserved at the seam.
  • Compression (kbps): Amount of Compression to be applied to a clip. Statistics about the compressed file size can be seen under the slider. A good approach to tuning this value is to drag the slider to a place that leaves the playback "good enough" while keeping the file small enough for your distribution requirements.

[Source]

Video

Using video files as textures requires a Pro license.

You can apply a video as a texture to a material using the MovieTexture asset component. Just drop a compatible video file in your project’s Asset folder and Unity will automatically create a MovieTexture asset component.

Unity supports any video format that can be played with Quicktime (.mov, .mpg, .mpeg, .mp4, .avi, .asf). Unity requires Quicktime to be pre-installed on your system. If you don’t have it installed, you can download Quicktime from the Apple website here: http://www.apple.com/quicktime/download/.

Unity does not support .wmv files. These files will need to be transcoded to a compatible format to be used in your game project. I suggest using Adobe Media Encoder and transcode the files to the Quicktime .mov format.
Unity - Video Import Settings

Unity – Video Import Settings

  • Bypass sRGB Sampling: Texture will not be converted from gamma space to linear space when sampled. Enable this option for GUI textures and look-up textures.
  • Quality: Compression of the Ogg Theora video file. A higher value means higher quality, but larger file size.

Movie textures will not be played automatically when the scene is opened. This must be done in script.

To play a movie file, attach the following script to a GameObject in your scene that has a MovieTexture applied to it’s material.

#pragma strict

private var movieTexture : MovieTexture;

function Start () 
{
	movieTexture = renderer.material.mainTexture as MovieTexture;
	if ( movieTexture != null )
	{
		movieTexture.loop = true;
	}
}

function Update () 
{
	if ( movieTexture != null )
	{
		if ( !movieTexture.isPlaying )
		{
			movieTexture.Play();			
		}
	}	
}

MovieTextures will also not loop by default and will not automatically stop when it has reached the last frame. If you want the movie texture to loop, you must set the loop property on the MovieTexture to true.

When a video file is imported, Unity will import the audio track as a separate AudioClip asset component.

Unity - Movie AudioClip

Unity – Movie AudioClip

To play the AudioClip together with the video, drag and drop the AudioClip asset component from the Project view onto a GameObject in the Hierarchy view that you want to act as the source (this does not necessarily have to be the same GameObject as the MovieTexture is applied to but it would make the most sense). Unity will automatically create an AudioSource component on the GameObject and assign the AudioClip to the AudioSource. To play the AudioSource use the audio.Play() method on the GameObject that owns the AudioSource. Don’t forget to set the loop property on the AudioSource to the same value of the loop property on the MovieTexture.

Here is an example script that will automatically play the AudioSource on a GameObject together with it’s MovieTexture (if it has one).

#pragma strict

private var movieTexture : MovieTexture;

function Start () 
{
	movieTexture = renderer.material.mainTexture as MovieTexture;
	if ( movieTexture != null )
	{
		movieTexture.loop = true;
	}
	if ( audio != null )
	{
		audio.loop = true;
	}
}

function Update () 
{
    if ( movieTexture != null )
	{
		if ( !movieTexture.isPlaying )
		{
			movieTexture.Play();
			if ( audio != null )
			{
				audio.Play();
			}
		}
	}	
}

[Source]

Text

Unity also supports text file assets with extensions .txt, .html, .htm, .xml, and .bytes (binary text format).

Unity - Text Asset

Unity – Text Asset

Text files have no import options, they are used as-is. However, TextAssets are read-only. You cannot use a TextAsset to write data. You can access the contents of a TextAsset using the text (read-only) property.

Binary data can be imported as a TextAsset asset as long as the file has the .bytes extension, Unity will treat it as a binary file. The binary data can be accessed using the bytes (read-only) property of the TextAsset.

Unity will only publish referenced assets (An asset that is assigned to a public script variable or referenced by a component that is attached to a GameObject) however TextAssets may not be referenced by any script or component. To ensure the TextAsset is published with your build, place the TextAsset in a special folder called Resources. Any assets in a folder called Resources will be published with your build and accessible using the Resources class.

For example, the following script will load a TextAsset and assign the binary data to a texture. The name of the resource to load can be specified in the Inspector by modifying the Texture Name property.

#pragma strict

public var textureName : String;

function Start () 
{
	// Load a binary asset from "Assets/Resources/[textureName].bytes"
	var imageData : TextAsset = Resources.Load( textureName );
	if ( imageData != null )
	{
		var newTexture : Texture2D = new Texture2D( 1, 1 );
		newTexture.LoadImage( imageData.bytes );
		renderer.material.mainTexture = newTexture;
	}

}

When loading resources in this way, you only need to specify the base name. You do not need to specify the full path or the extension of the file.

[Source]

GameObject

Every object in your scene is a GameObject. A GameObject can either be a visual object (such as a Mesh, Terrain or a Light) or a GameObject can simply be a parent node or a root node that is used to group other GameObjects that share some kind of relationship.

This type of hierarchical structure is also known as a Composite. This is a very powerful way to organize your complex scenes.

GameObjects can also be used as logical entities which do not have any renderable component attached to them nor do they necessarily have any child GameObjects with renderable componenents. In this case, a GameObject may only have Script components attached to them which can be used to control the logic of abstract game elements such as Unity’s internal Network functionality.

The image below shows an empty GameObject that has no components attached to it.

Unity - GameObject

Unity – GameObject

A GameObject by itself is not very interesting. You must add at least one Component to a GameObject in order for it to have purpose. For example, to make a GameObject act like a Light, you must attach a Light component to the GameObject.

Every GameObject has the following properties:

  • Name: The name that is used to identify the GameObject. The Name property does not have to be unique in the scene unless you need to need to access the GameObject from a script.
  • Tag: The Tag property can be used to identify the GameObject. Using the Tag property to search for GameObjects in the scene is more efficient than using it’s name. If you will be accessing a GameObject a lot, then it is better to assign the GameObject an identifiable Tag and use the Tag to find the GameObject instead of the Name property.
  • Layer: The Layer property is used to selectively render certain objects (the Camera component’s Culling Mask property can be used to disable rendering of certain GameObjects according to their layer) or to ignore raycast (The Physics.Raycast function accepts a Layer Mask property which can be used to ignore GameObjects according to their Layer property).
  • Transform: Every GameObject in the scene has one and only one Transform component. The Transform component determines the position, orientation, and scale of a GameObject relative to its parent (GameObjects at the top-level in the hierarchy view are relative to the scene’s world-origin).
  • Static: If a GameObject will not move or it should be used for lightmapping, navigation, or occlusion culling (these topics will be discussed in a later article), then it’s Static property should be enabled. Usually you will only do this on GameObjects that have a Mesh component attached to them and will never move in the scene (such as buildings, level geometry, and static environment props like rocks and trees). Anything that can be moved (such as physics or kinematic controlled GameObjects, or animated character models) should not be marked as Static.

[Source]

Searching for GameObjects

It may be necessary to find a particular GameObject in your scene at run-time. This is done with the power of scripting. There are several ways to accomplish this task and it is important to know the correct way of doing this depending on the situation.

Suppose you have the following scene:

Unity - Test Scene

Unity – Test Scene

(Click on the image to show it full-size).

This simple test scene consists of 3 cubes:

  • Cube 01 with tag “Right
  • Cube 02 with tag “Middle
  • Cube 03 with tag “Left

There are 3 ways to access the cube GameObjects in this scene:

  • By Reference
  • By Name
  • By Tag

Assign by Reference

If a GameObject is created in the editor (as opposed to creating the object dynamically at run-time) it is possible to assign the GameObject to a script variable using the Inspector view.

Create a script similar to what is shown below.

#pragma strict

public var otherGameObject : GameObject;

function Start () 
{
	if ( otherGameObject != null )
	{
		Debug.Log("I am \"" + name + "\" and I have a reference to the "
		  + "GameObject with name \"" + otherGameObject.name + "\"" );
	}
}

If you assign this script to the cube GameObjects in this scene (drag and drop the script from the Project view onto the GameObjects in the Hierarchy view) then you see the public property called “Other Game Object” exposed in the Inspector view (shown highlighted in the image below).

Unity - Assign by Reference

Unity – Assign by Reference

If you click the little circle icon Select Object next to the parameter in the Inspector view, you will be presented with a dialog box that lets you select a compatible GameObject from the scene (make sure you select the “Scene” tab at the top of this dialog box).

Unity - Select GameObject

Unity – Select GameObject

If I assign Cube 01 a reference to Cube 02, Cube 02 a reference to Cube 03 and Cube 03 a reference to Cube 01 then I should get the following output in the console window (Shift + Ctrl + C):

Unity - Console Window

Unity – Console Window

This is probably the most efficient way to assign a reference to a GameObject. However, you may not know until run-time which GameObject you need to refer to.

Find by Tag

You can also use a GameObject‘s Tag property to find it within the scene.

Modify the script using the following code:

#pragma strict

public var otherTag : String;
private var otherGameObject : GameObject;

function Start () 
{
	if ( otherTag.Length > 0 )
	{
		otherGameObject = GameObject.FindGameObjectWithTag(otherTag);
		if ( otherGameObject != null )
		{
		Debug.Log("I have tag \"" + tag + "\" and I found a GameObject with tag \""
		  + otherGameObject.tag + "\"" );		
		}
	}
}

In the Inspector, change the Other Tag script property to match the Tag property that was assigned to each corresponding GameObject (For example, Cube 01 has Tag “Right“).

If you run the game, you should see the following output in the Console window (Shift + Ctrl + C):

Unity - Console Window (2)

Unity – Console Window (2)

Using the Tag property to find a GameObject in the scene is more efficient than using the Name property because Unity is able to pre-sort GameObjects in the scene into lists according to the GameObject‘s Tag property.

The Tag property does not have to be unique. For example, many GameObjects can have the same Tag and you can retrieve all the GameObjects in the scene with a particular Tag value using the GameObject.FindGameObjectsWithTag(String) static method (notice the plural ending on GameObjects in the method name “FindGameObjectsWithTag“).

The GameObject.FindGameObjectWithTag(String tag) static method is used to retrieve a reference to a single GameObject and the GameObject.FindGameObjectsWithTag(String tag) static method is used to retrieve an array of all GameObjects with the matching tag.

[Source]

Find by Name

GameObjects can also be searched in the scene by their assigned name using the GameObject.Find(String name) static method. This is probably the most inefficient way to search for GameObject‘s because Unity must search every GameObject in the scene matching it’s name property to the search parameter. In some cases, it may be unavoidable. For example, a dynamically created object that does not have a tag can only be found by it’s name.

Generally, you do not want to call this method every frame (in the Update method) but instead you will want to cache a reference to the GameObject and only search for it by name if the reference is NULL.

I will not show an example of this as it is very similar to the example I already showed using the Tag property.

[Source]

Prefabs

A Prefab is a GameObject that you can save to your Asset folder so that you can easily create copies of that GameObject in your scene or in other scenes. Prefabs can also be instantiated dynamically at run-time using scripts.

A Prefab can also be considered a Template for a complex GameObject structure. You can modify the properties of the individual instances so that each instance of the Perfab can have different properties while maintaining the general structure of the original Perfab.

To create a Prefab, first construct your GameObject in the scene view then drag-and-drop the GameObject from the Hierarchy view to the Project view.

Creating Prefabs

Let’s create a Brick prefab that can be used to instantiate a lot of Brick instances in the scene at runtime.

Open Unity and create a new scene.

Create a Cube GameObject (select GameObject -> Create Other -> Cube from the main menu). Rename the Cube GameObject to “Brick“.

Unity - Brick Prefab

Unity – Brick Prefab

Add a Rigidbody component to the Brick GameObject (with the Brick selected, select Component -> Physics -> Rigidbody from the main menu). Now we have a physics controlled brick.

Now drag-and-drop the Brick game object from the Hierarchy view into the Project view. You have just created a Prefab!

Unity - Brick Prefab (2)

Unity – Brick Prefab (2)

In the screen shot above, you see in the Project view that we have created a new Asset called Brick. The Asset is a copy of the original Brick GameObject in the Hierarchy view. You will also notice that the Brick GameObject in the Hierarchy view is colored blue. This indicates that the GameObject is created from a Prefab Asset.

Components

Components give GameObjects their functionality. A GameObject can be considered a container for many different Components.

When you create an empty GameObject, it will always have the Transform component by default. A GameObject cannot exist without a Transform component because this component determines the GameObject‘s position, orientation, and scale in the world. You cannot remove the Transform component from a GameObject.

Components can be added to a GameObject by selecting the GameObject in either the Hierarchy or the Scene view. With a GameObject selected, choose the Component you want to add to the GameObject using the Component menu item on the main menu.

For the remainder of this article, I will provide a brief introduction to the different types of components that the Unity editor provides. In later articles I will demonstrate how to use these components in more detail.

[Source]

Animation Components

The animation components allow you to import or create animation data that can be used to manipulate GameObjects at run-time.

[Source]

Animation

The Animation component allows you to assign a list of animations that can be played using the animation scripting interface.

Unity - Animation Component

Unity – Animation Component

[Source]

Animation Clip

The Animation Clip is an asset component that is added to the Animation component discussed above. The Animation Clip contains the animation data. Animation Clips that are imported from an animated mesh file (such as FBX file) cannot be manipulated directly. You must either create a new Animation Clip asset in the project or duplicate (Ctrl-D) an Animation Clip that has been imported.

Animation Clips can be edited using the Animation View shown below.

Unity - Animation View

Unity – Animation View

[Source]

Audio Components

The Audio components implement both ambient (music) and one-shot sound effects in Unity.

[Source]

Audio Listener

The Audio Listener is usually attached to the Main Camera GameObject. This component will determine how the 3D sound effects are produced.

The Audio Listener component does not have any properties to manipulate.

Unity - Audio Listener

Unity – Audio Listener

[Source]

Audio Source

An Audio Source component is used to produce sound effects in the game. Audio sources can be attached to any GameObject. The position of the GameObject in the world will determine the position and attenuation of the Audio Source.

Unity - Audio Source

Unity – Audio Source

[Source]

Effects Components

Effects Components all you to add visual effects to the game.

[Source]

Particle System (Shuriken)

Unity 3.5 introduced a new particle system called Shuriken. Shuriken is a powerful particle effects editor that allows you to easily create complex particle effects.

The Particle System component is manipulated with the Particle Effects view.

Unity - Particle System (Shuriken)

Unity – Particle System (Shuriken)

[Source]

Halo

The Halo Component can be used to render a circular particle at the position of the GameObject. The Halo component is used to simulate a glow and works best when used on point light sources.

Unity - Halo Component

Unity – Halo Component

[Source]

Lens Flare

The Lens Flare component is normally attached to light sources and simulates an effect that is typical on camera lenses when a very bright light source is in direct view of the camera.

Unity - Lens Flare Component

Unity – Lens Flare Component

[Source]

Line Renderer

The Line Renderer component is used to render 3D textured path of polygons using an array of points to determine the path. The path is not smoothed or interpolated so to create smooth paths, you will need alot of points.

The Line Renderer component does not fade-out over time.

Unity - Line Renderer Component

Unity – Line Renderer Component

The Line Renderer component uses the same algorithm to compute the geometry of the line as the Trail Renderer component discussed next.

[Source]

Trail Renderer

Like the Line Renderer component, the Trail Renderer component will draw a 3D line using the line drawing algorithm the Line Renderer uses. Unlike the Line Renderer component, the Trail Renderer component will use the last sampled position of the GameObject it is attached to determine the path of the line. This means that the GameObject must be moving for a trail to be formed. Stationary GameObjects will not produce a trail.

Unity - Trail Renderer

Unity – Trail Renderer

The Trail Renderer component will automatically fade-out over time determined by the Time parameter of the Trail Renderer component.

[Source]

Projector

A Projector component is similar to the Camera component in that it defines a view frustum. Any geometry that is within the view frustrum will have the the projector’s material projected onto it. Projectors are very useful for things like bullet holes in walls or shadow blobs below characters and vehicles which is a cheap way of producing dynamic shadows!

Do not use projects where a normal textured quad will produce the same result!

Unity - Projector Component

Unity – Projector Component

[Source]

Mesh Components

Meshes are the primary graphics primitive used to represent visual objects in Unity. Several components exist to produce static or animated characters, and 3D text.

[Source]

Mesh Filter

The Mesh Filter component is a container for mesh data. When you import a model into your project (an FBX file for example) it is possible that the model contains several sub-meshes. The Mesh Filter component is used to refer to a particular sub-mesh of the model.

A Mesh Filter component must be used together with a Mesh Renderer component on the same GameObject. A GameObject with a Mesh Filter component will store the referenced mesh geometry in garphics memory but nothing will be rendered without a Mesh Renderer component assigned to the GameObject.

Unity - Mesh Filter

Unity – Mesh Filter

[Source]

Mesh Renderer

A Mesh Renderer component will take the geometry data from the Mesh Filter component and render it to the screen at the GameObject’s current position and orientation.

Unity - Mesh Renderer

Unity – Mesh Renderer

[Source]

Skinned Mesh Renderer

The Skinned Mesh Renderer component is used to render animated skinned meshes (like character models).

Unity - Skinned Mesh Renderer

Unity – Skinned Mesh Renderer

[Source]

Text Mesh

The Text Mesh component is used in conjunction with the Mesh Renderer to produce 3D text in the scene. The text is not extruded but instead 2D quads are used to render each letter in 3D space. This means that the text will not be visible when viewed from the side. This component could be used to create dynamic billboard text (for example a scrolling marquee light board sign)

Unity - Text Mesh

Unity – Text Mesh

[Source]

Rendering Components

Render components are components that have something to do with rendering in-game and user interface elements. This category includes the camera, gui elements, lights, occlusion, skybox and Level of Detail components.

[Source]

Camera

The Camera component is the most ubiquitous component in your scene. Without at least one GameObject with a Camera component in your scene, you will not see anything in your game. Playing the game without a camera in the scene will produce a black screen.

Unity - Camera Component

Unity – Camera Component

When you select the Camera, the Camera Preview dialog appears in your scene view.

[Source]

Flare Layer

A Flare Layer component must be added to the Camera in order for the Lens Flare component to render.

Unity - Flare Layer

Unity – Flare Layer

If you remove the Flare Layer component from the Camera or disable the component, the Lens Flare effect will still render in the Scene view but it will not appear in the Game view.

[Source]

GUI Layer

Like the Flare Layer, the GUI Layer is required to render all 2D GUI Text and GUI Texture elements.

[Source]

GUI Text

The GUI Text component is used to display text on the screen. The position the text appears on screen is determined by the GameObject‘s X and Y position values. The X and Y values are in normalized (in the range [0,1]) screen space where (0,0) is the bottom-left and (1,1) is the top-right point on the screen.

Unity - GUI Text

Unity – GUI Text

[Source]

GUI Texture

The GUI Texture component is used to display a 2D screen texture elements. The GUI Texture component use’s the GameObject‘s X and Y position to determine the normalized (in the range [0,1]) screen space of where the texture will appear.

Unity - GUI Texture

Unity – GUI Texture

As you can see from the image above, the position of the GameObject with the GUI Texture component is (0.5, 0.5, 0) which causes the GUI Texture to appear in the center of the screen.

[Source]

Light

Lights are used to illuminate the scene.

Unity - Light Component

Unity – Light Component

[Source]

Light Probe Group

The Light Probe Group component allows you to add light probes to the scene. A Light Probe works in conjunction with Light Mapping (I will discuss Light Mapping in another article) in order to properly illuminate dynamic objects according to the light contributions of baked-only lights.

Unity - Light Probes

Unity – Light Probes

[Source]

Occlusion Area (Pro Only)

The Occlusion Area component is used to define a region in the game where occlusion culling will occur.

By default, Unity will generate occlusion data based on the bounds of the objects in the scene but you may want to specify certain areas that will generate data structures for occluding static objects (view volume) and dynamic objects (target volume). The Occlusion Area component allows you to do that.

Unity - Occlusion Area

Unity – Occlusion Area

[Source]

Occlusion Portals

The Occlusion Portal component is similar to Occlusion Area component in that it allows you to define a 3 dimensional area that is used for occlusion culling.

An Occlusion Portal is used in doorways where the door can be opened and closed. The portal can be “Opened” or “Closed” in script when the door that is occluding the geometry is opened or closed.

Unity - Occlusion Portal

Unity – Occlusion Portal

[Source]

Skybox

A Skybox component is used to simulate an environment that wraps around your entire game world. You can either add the Skybox component to the main camera, or if you have many camera’s in the scene and you want all of them to use the same Skybox, you can configure the Skybox material in the Render Settings (Choose Edit -> Render Settings from the main menu).

Unity - Skybox

Unity – Skybox

[Source]

Level of Detail (Pro Only)

The LOD Group component allows you to specify different representations of an object based on it’s distance away from the camera.

Unity - LOD Group

Unity – LOD Group

[Source]

Physics Components

Unity uses the NVIDIA PhysX physics engine to perform the physics simulations. The physics components are required for GameObjects to participate in physics simulations and to perform collision detection with other physics controlled GameObjects.

[Source]

Physics

Rigidbody

The Rigidbody component allows the GameObjects to be influenced by physical forces such as gravity or wind forces.

Static objects that will not be physics simulated do not need to have rigid bodies assigned to them.

Unity - Rigidbody

Unity – Rigidbody

In the image above, you see three cubes hovering over a plane. When simulating, the cubes will fall onto the plane. The cubes will act under the force of gravity and therefor must have a Rigidbody component assigned to them. The plane however is stationary and won’t move. In this case, the plane does not need to have a Rigidbody component assigned to it.

[Source]

Character Controller

The Character Controller component is usually attached to the player character and any game character that needs to move around the scene. This component will create a Capsule Collider around the character that is used to perform the physics collision with the environment.

Unity - Character Controller

Unity – Character Controller

[Source]

Consant Force

The Constant Force component can be used to apply a physical force to a GameObject. This will allow the GameObject to appear to be pushed through space by an external force (such as a rocket).

Unity - Constant Force

Unity – Constant Force

[Source]

Colliders

Collider components allow for collision detection to occur. Without a collider component on the GameObject, then it will simply pass through all other objects as if they were not there.

Sphere Collider

As the name suggests, a Sphere Collider component simulates the shape of a sphere. This collider is commonly used on sphere shaped objects.

Unity - Sphere Collider

Unity – Sphere Collider

[Source]

Box Collider

The Box Collider component should be placed on objects that resemble the shape of a box.

Unity - Box Collider

Unity – Box Collider

[Source]

Capsule Collider

The Capsule Collider component is used on cylinder shaped objects that are rounded on each end. A Capsule Collider is automatically created on GameObjects that have a Character Controller component attached to them.

Unity - Capsule Collider

Unity – Capsule Collider

[Source]

Mesh Collider

The Mesh Collider can be used if none of the other colliders fit the shape of your object.

The Mesh Collider component will not collide with other Mesh Collider components unless the “Convex” option is enabled.

Unity - Mesh Collider

Unity – Mesh Collider

[Source]

Wheel Collider

The Wheel Collider components are special collision components that are used for grounded vehicles.

Unity - Wheel Collider

Unity – Wheel Collider

[Source]

Conclusion

In this article I talked about the three basic building blocks that Unity uses to help you make games:

  • Assets
  • GameObjects
  • Components

In this article, I did not describe every component available to you in Unity but I only wanted to give a brief introduction to some of the more commonly used components that you will very likely use in your own projects.

In later articles, I would like to describe some of the more interesting features of the Unity editor such as terrains, physics, GUI interfaces, and special effects.

Exercise

The intention of this exercise is to introduce you to the Asset pipeline in Unity.

  1. Create a new Unity Project (do not add any standard assets). By default, Unity will create an empty scene with only a Main Camera.
  2. Download a 3D model file or use a 3D model that you have previously created. The model file must be in a format that is supported by Unity (any of the model formats listed in this article will work as long as you have the relevant software installed. FBX and OBJ model formats will work without any additional software installed). You can find free models on TurboSquid (http://www.turbosquid.com/Search/3D-Models?max_price=0&&min_price=0 – Requires you to login using a user account).
  3. Save the 3D model in the Asset folder or use the Assets -> Import New Asset… command from the main menu to import your model asset into Unity.
  4. Create an instance of the model you just imported in an empty scene by drag-and-droping the 3D model Asset into the scene view.
  5. Create a Plane GameObject in your scene (select GameObject -> Create Other -> Plane from the main menu).
  6. Zero the Position and Rotation of the Plane GameObject so that it is centered at the origin of the world.
  7. Create a Cube GameObject in your scene (select GameObject -> Create Other -> Cube from the main menu).
  8. Create a Sphere GameObject in your scene (select GameObject -> Create Other -> Sphere from the main menu).
  9. Create a Cylinder GameObject in your scene (select GameObject -> Create Other -> Cylinder from the main menu).
  10. Position the Cube, Sphere, and Cylinder above the Plane so that no GameObjects are intersecting.
  11. Import 4 different image files into your project.
  12. Place a different texture on each of the 4 GameObjects you just created (Plane, Cube, Sphere, and Cylinder)
  13. Create a directional light to illuminate your scene.
  14. Orient your Main Camera so that all of the objects are in view.
  15. Save your scene.

If you play your game, you should see something similar to what is shown below.

Unity - Asset Pipeline Exercise

Unity – Asset Pipeline Exercise

Of course your scene will look better than mine. My scene is victim to “programmer art”.

References

The Unity User Manual:
http://docs.unity3d.com/Documentation/Manual/index.html

The Unity Component Reference documentation:
http://docs.unity3d.com/Documentation/Components/index.html

The Unity Scripting Reference:
http://docs.unity3d.com/Documentation/ScriptReference/index.html

2 thoughts on “Unity Asset Pipeline, GameObjects and Components

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>