Resources.Load is not working with an existing file in Resources?

I am attempting to load a created ScriptableObject. The file gets placed correctly, and exists in a folder under /Resources/, as it is supposed to.

However, when it is actually loaded via Resources.Load, it returns a Null - even though a System.IO.File.Exists says that the path is valid - and that the file is actually correct. This is what handles the file load. All of the correct variables show up in Inspector and looking at the file in a text editor:

public void loadLevel(string fileName)
    // Path - Valid: Assets/GameAssets/Resources/Levels 
    string filePath = fileDirectory + fileName;

    if (System.IO.File.Exists(filePath + ".asset")) // The file does exist, and has content;
        // Scriptable Object //
        Level tempLvl = Resources.Load<Level>(filePath); // No ".asset" on actual name 
        // Returns Null!

Can anyone tell me what might be going on here? I did one final test - moving everything directly into Resources, but it returned the same result.

Here is a example of a file that I’m attempting to load - so it’s not actually null:

alt text

When using Resources.Load you don’t specify the full path, you specify the path within the Resources folder. So your path should be “Levels + fileName” not “Assets/GameAssets/Resources/Levels + fileName”. Also, you need to omit the file extension of .asset. Read more here: Unity - Scripting API: Resources.Load

Once I had the problem with Resources.Load in Unity 2019.4: existing prefabs could not be instantiated anymore (after I did a complete reimport of all assets).
I solved this by renaming the “Resources” folder to something else - then renamed it back to “Resources”. Suddenly everything worked as expected again. Hope this might help someone having the same troubles :wink: