Skip navigation

Using the exercise files

Using the exercise files: Advanced Unity: 3D Game Programming
Using the exercise files: Advanced Unity: 3D Game Programming

Join for an in-depth discussion in this video Using the exercise files, part of Advanced Unity: 3D Game Programming.

Resume Transcript Auto-Scroll
Skill Level Advanced
3h 45m
Show More Show Less

Q: In the Chapter 3 file EntityLoader.cs, I get an error: DirectoryNotFoundException: Directory 'Assets\' not found. Removing the backslash after 'Assets' fixes it, but then I run into a different error. How do I fix this?

A: Some operating systems (like Mac OS X) use different directory separator characters. To make the code more compatible with different OSs, use ` Path.DirectorySeparatorChar` instead of `\` in all instances in this code. The replacements result in the following code:
string dataFolder = @"Assets" + Path.DirectorySeparatorChar;
Dictionary<string, CustomPrefab> prefabs = new Dictionary<string,
// Use this for initializationvoid Start () {
foreach(string dataFile in Directory.GetFiles(dataFolder, "*.data",
SearchOption.AllDirectories)) {
string[] lines = File.ReadAllLines(dataFile);
string name =
dataFile.LastIndexOf(".") -
prefabs.Add(name, new CustomPrefab(name, lines));

Q: What version of Unity does this course cover?

A:  This course requires Unity 4.5.5. The newer versions of Unity have done away with the GUI system used in this course, so the interfaces included for many of the scenes will not work with 4.6 and higher. You can download Unity 4.5.5 at

Q: The game object in the first chapter's Mouse Input Raycasting sample doesn't appear to follow the mouse. What's wrong?

A: Please enable the Box Collider component (by activating the checkbox next to the component name) on the game object. This is not explicitly mentioned in the video, but it will ensure the raycasts collide with the game object.

Skills covered in this course
3D + Animation Developer Games Game Development Unity

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start Your Free Trial Now

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now