Can't Resources.Load ScriptableObject in Static class
I'm trying to save and increment a version number via a custom scriptable object that's in my resources folder. (Yes I have double checked the file names are correct and they are in a properly named Resources directory at it's root.)
Here's the VersionScriptableObject Class:
public class VersionScriptableObject : ScriptableObject {
public string Version;
}
No matter how I cast it, it doesn't seem to work.
VersionScriptableObject Vso = Resources.Load ("Version") as VersionScriptableObject;
Debug.Log (Vso.ToString ());
This returns null for Vso.
VersionScriptableObject[] arVso = (VersionScriptableObject[]) Resources.FindObjectsOfTypeAll(typeof(VersionScriptableObject));
This gives me an array of 0 entries.
Object GoVso = Resources.Load ("Version");
Debug.Log (GoVso.GetType().ToString());
This tells me it's a UnityEngine.TextAsset. Which I can read from but I can't modify.
Anyone have any ideas?
Your answer
Follow this Question
Related Questions
Why does NetworkServer.ReplacePlayerForConnection not recognize the instantiated object parameter? 0 Answers
I guys I have a really hard question 0 Answers
How would you save anti aliasing or v-sync stuff that are like QualitySettings.antiAliasing = 2; 0 Answers
Unity 5.3 UI Button wont set Select state via script after the parent has been set inactive 0 Answers