DIY Cave Environment Are you missing a using directive or an assembly reference?

Hey I am having problems building my game file due to some weird thing with Unity Editor and AssetPostProcessor. I want to use this great Cave package but it doesn’t want to build. I tried those #if UNITY_EDITOR and #endif but they just bring up the same issue only it mentions "Are you missing a using directive or an assembly reference for “AssetPostProcessor”.

I never touched this part, and it worked in my previous versions of Unity 4. So what suddenly happened? Here is the script the issue originates from known as “OnPreprocessModel.cs”.

using UnityEngine;
using UnityEditor;

class MeshPostprocessor : AssetPostprocessor {

void OnPreprocessModel () {
    (assetImporter as ModelImporter).globalScale = 1;
	(assetImporter as ModelImporter).addCollider = true;
}

}

Okay never mind…To resolve this problem put the #endif at the VERY end of the script. Should resolve the building issue. Thanks.