unity3d ScriptableObject Create ScriptableObject instances through code


Example

You create new ScriptableObject instances through ScriptableObject.CreateInstance<T>()

T obj = ScriptableObject.CreateInstance<T>();

Where T extends ScriptableObject.

Do not create ScriptableObjects by calling their constructors, ie. new ScriptableObject().

Creating ScriptableObjects by code during runtime is rarely called for because their main use is data serialization. You might as well use standard classes at this point. It is more common when you are scripting editor extensions.