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/ScriptPipeline/pipeline.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,4 +80,8 @@ The script loading/unloading order will look as follows:
80
80
- the order in which components are attached/detached, will determing what order scripts will be processed
81
81
- scripts are processed one-by-one, i.e. each machine is ticked to completion before the next one is started
82
82
- meaning for example if two scripts are loaded, their `on_script_loaded` hooks will not run at the same "lockstep".
83
-
- loading/unloading might happen over multiple frames, depending on the pipeline's settings.
83
+
- loading/unloading might happen over multiple frames, depending on the pipeline's settings.
84
+
85
+
## Waiting for scripts to load
86
+
87
+
In order to check on the pipeline and figure out when everything is ready, you can use the `ScriptPipelineState<P>` system parameter in a system as shown in the `script_loading`[example](https://github.com/makspll/bevy_mod_scripting/blob/main/examples/script_loading.rs).
Prefer using strong asset handles, internal references will only persist weak versions of the handle, leaving you in control of the asset handle via the container component.
Scripts added directly through assets, or via asset server without an asset path, will not contain path information, and logs will be slightly less useful.
77
+
78
+
</div>
67
79
68
80
## Static Scripts
69
81
You can use attach and detach commands, which will run the [script pipeline](../ScriptPipeline/pipeline.md), repeatedly until the requested script attachments are processed. If you don't want to incur big frametime slowdowns, you can instead send `ScriptAttachedEvent` and `ScriptDetachedEvent` manually, and let the pipeline pick these up as normal.
0 commit comments