Differences
This shows you the differences between two versions of the page.
|
|
scriptableobject [2021/04/19 20:16] uninomiconadmin created |
scriptableobject [2021/08/05 17:33] (current) zenanon Add note about NonSerialized, Awake on SOs |
| |
* ''private'' fields on ScriptableObjects will be serialized and restored during a domain reload in the Editor. | * ''private'' fields on ScriptableObjects will be serialized and restored during a domain reload in the Editor. |
| * You can prevent this by adding the ''[NonSerialized]'' attribute on the field. |
| * ''Awake()'' on ScriptableObjects is called when an instance of the ScriptableObject is created (such as by ''CreateInstance<MyScriptableObject>()''), or when the game starts in a build for asset instances of ScriptableObjects, but **not** on asset instances in Editor. |