Scriptname and classname do not match in assetbundle.

I have an asset using the the ColorCube script. This works fine when loaded in the scene from the editor. But when I want to load this asset from an assetbundle (built using the script found in the Unity docs) in webplayer-mode it gives the following error:

The class defined in script file named 'ColorCube' does not match the file name!
UnityEngine.Object:Instantiate(Object)
<Start>c__IteratorA:MoveNext() (at Assets/Scripts/GameLogic/LoadAsset.cs:14)

LoadAsset.cs:

using UnityEngine;
using System.Collections;

    public class LoadAsset : MonoBehaviour {
            IEnumerator Start () {
            		WWW www = new WWW("file:///C:/Users/Someone/Folder 1/Folder2/
    Folder3/Folder4/Folder5/simpleColorCubes.unity3d");
            		yield return www;
            		Instantiate(www.assetBundle.mainAsset); //Line 14
        }
   }

I confirmed that the script’s main class that was compiled in the assetbundle (and inherits MonoBehaviour) also has the same name ‘ColorCube’.

Does anyone have any idea what I could have done wrong?

Unity Pro 3.4.1f5 - Win7 64x - Webplayer mode

Did you by chance rename the AssetBundle.cs and if so did it used to be named LoadAsset.cs, cuz if you did you need to change the class name “LoadAsset” in the file to match the filename.

I re-imported everything into a new Unity Project and now it works.