I’ve been trying to solve a mans Question Learned I cannot help him any longer but out of curiosity I went looking in link @meat5000 provided and I found something I’ve never saw ScriptableObject before
I guess the idea is to have an object that is not a component. So it is in memory like any object but not on any GameObject. Meaning you won’t see it in the Inspector nor in the Scene list.
You create one like this:
public class NewBehaviourScript : ScriptableObject {
int a = 10;
public int A{
get{return a;}
}
}
and you use like this:
public class Trial : MonoBehaviour {
NewBehaviourScript newGuy;
void Start ()
{
newGuy = (NewBehaviourScript)ScriptableObject.CreateInstance(typeof(NewBehaviourScript));
print(newGuy.A);
}
}
You keep track of it via the reference you assign it to. Just like basic programming.
It is just a storage class for values and methods, I don’t think it is meant to have a mesh. It does not seem to have any update so you would have to update via your own call.
If you look at the inheritance hierarchy it has nothing to do with the whole MonoBehaviour apart from being an Object.
So, it is just for storing info and helpers.
My point of view.
EDIT: it then makes sense to be able to create millions of them since they are just taking space in memory but no resources, no update call, no Unity maintainance, only GC when needed.