I was told to use ScriptableObject for item statistics/class information and I THOUGHT I was doing so when I copied some ones snippit but then I found out I was using a Class that wasn’t extending anything. I made one that now extends ScriptableObject but have NO clue how I can get into the ScriptableObject to set the variables in the editor like I need to do. I can use the CreateInstance function OnAwake and then set stuff that way but I need a way to set the variables before runtime, and a way I can see them in the editor without running the project.Is there a way to do this? I need something like looks just like setting class variables in the editor of a class that extends monobehaviour, but have no idea how to do this. I tried looking through the script ref but it is completely useless as far as ScriptableObjects go…
UnityScript is what I use so a solution in that language would be best but I could get by with something in C#
Yeah I don’t blame you for having trouble with this; there’re a couple steps to do what you want.
You need to create an editor class (script inside Editor folder) and then have a static method with the MenuItem attribute applied to do the work. You also need to use the AssetDatabase class to create a .asset for you (this will be the custom ScriptableObject). I’m sure there are samples of it floating around the web.