AssetDatabase.LoadAssetAtPath() returns null on Unity restart

Hello guys,

I’m serializing a configuration file and loading it. The file is created just fine, and the AssetDatabase.LoadAssetAtPath() can retrieve it’s information. The problem is when I reopen Unity, AssetDatabase.LoadAssetAtPath() returns null. I use the code below to test the load of the asset.

 [MenuItem("AssetTest/Test Load")]
        static void TestLoadMenu()

        {

            CoreSettings core = CreateInstance<CoreSettings>();

            UnityEngine.Object objecto = AssetDatabase.LoadAssetAtPath(API.CoreDataLocation, typeof(CoreSettings));
            // Create the coreSettings asset.
            core = AssetDatabase.LoadAssetAtPath(API.CoreDataLocation, typeof(CoreSettings)) as CoreSettings;

            if (core == null)
                Debug.Log("Test Load: Failed.");
            else
                Debug.Log("Test load:" + core.LaserLenght + "

");

        }

Notice: I can also open it on Sublime or a text editor (with Unity closed) and all my information is there.
Any ideas why AssetDatabase.LoadAssetAtPath() is returning null?

Well I have a feeling I found the answer since I got this to work… Unity says it “supports” C#6 so I was using some languages features on my code. I was referencing static constants like this:

using static SmashMountain.VR.Common.Constants;

If you have that on your code, revert back to something like:

using SmashMountain.VR.Common;

See if it does the trick, if so please comment here so I know it helped.
Thanks.