You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/guides/creating-custom-types.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ public class NewScriptableObject : RuntimeScriptableObject
26
26
27
27
### OnStart
28
28
29
-
There are two methods you can override to hook into the initialization of the scriptable object: [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/) and [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/). [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/) is called before [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/).
29
+
There are two methods you can override to hook into the initialization of the scriptable object: [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart) and [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart). [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart) is called before [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart).
30
30
31
-
When a scriptable object is loaded or instantiated at runtime, [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/) and [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/) will be called immediately after the object is loaded. This means it's safe to subscribe to any events directly after loading the object.
31
+
When a scriptable object is loaded or instantiated at runtime, [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart) and [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart) will be called immediately after the object is loaded. This means it's safe to subscribe to any events directly after loading the object.
32
32
33
-
[`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/) will be called on all loaded scriptable objects before [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/). Likewise, [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/) will be called on all loaded scriptable objects after [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/).
33
+
[`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart) will be called on all loaded scriptable objects before [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart). Likewise, [`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart) will be called on all loaded scriptable objects after [`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart).
34
34
35
-
[`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart/) is used for preparing the object itself, like cleaning up old data or resetting values. **You should not subscribe to any other scriptable objects in this method!** This is because the other scriptable objects may not have been initialized yet.
35
+
[`OnPreStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onprestart) is used for preparing the object itself, like cleaning up old data or resetting values. **You should not subscribe to any other scriptable objects in this method!** This is because the other scriptable objects may not have been initialized yet.
36
36
37
-
[`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart/) can be used for subscribing to other scriptable objects or initializing data that depends on other objects. Other scriptable objects should have been initialized by now.
37
+
[`OnStart`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onstart) can be used for subscribing to other scriptable objects or initializing data that depends on other objects. Other scriptable objects should have been initialized by now.
38
38
39
39
```csharp title="OnStart Example"
40
40
usingHertzole.ScriptableValues;
@@ -61,15 +61,15 @@ public class NewScriptableObject : RuntimeScriptableObject
61
61
62
62
### OnDisabled
63
63
64
-
There are two methods you can override to hook into when the scriptable object is disabled: [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/) and [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/). [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/) is called before [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/).
64
+
There are two methods you can override to hook into when the scriptable object is disabled: [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled) and [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled). [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled) is called before [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled).
65
65
66
-
When exiting play mode, [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/) and [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/) will be called immediately before the editor switches back to edit mode. This means it's safe to unsubscribe from any events directly after exiting play mode.
66
+
When exiting play mode, [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled) and [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled) will be called immediately before the editor switches back to edit mode. This means it's safe to unsubscribe from any events directly after exiting play mode.
67
67
68
-
[`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/) will be called on all loaded scriptable objects before [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/) when they are destroyed at the same time. Likewise, [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/) will be called on all loaded scriptable objects after [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/).
68
+
[`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled) will be called on all loaded scriptable objects before [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled) when they are destroyed at the same time. Likewise, [`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled) will be called on all loaded scriptable objects after [`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled).
69
69
70
-
[`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled/) is used for unsubscribing from other scriptable objects or cleaning up data that depends on other objects. Other scriptable objects should still be initialized at this point.
70
+
[`OnPreDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#onpredisabled) is used for unsubscribing from other scriptable objects or cleaning up data that depends on other objects. Other scriptable objects should still be initialized at this point.
71
71
72
-
[`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled/) can be used for cleaning up the object itself, like resetting values or releasing resources. **You should not unsubscribe from any other scriptable objects in this method!** This is because the other scriptable objects may have already been disabled.
72
+
[`OnDisabled`](../../reference/hertzole.scriptablevalues.runtimescriptableobject/#ondisabled) can be used for cleaning up the object itself, like resetting values or releasing resources. **You should not unsubscribe from any other scriptable objects in this method!** This is because the other scriptable objects may have already been disabled.
0 commit comments