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
<ahref="https://github.com/makspll/bevy_mod_scripting/edit/main/docs/src/Migration/0.14-to-0.15.md" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
150
+
<ahref="https://github.com/makspll/bevy_mod_scripting/edit/main/docs/src/ReleaseNotes/0.14-to-0.15.md" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
<p><code>script_id</code> is replaced with <code>script_asset</code> which now has a type of <code>Handle<ScriptAsset></code>. This means that you can no longer use a string to refer to a script, but rather you must use a handle.</p>
323
+
<p>Scripts can still access the asset path of the script using:</p>
<p>The concept of script attachments has been introduced to describe the idea of a script instance. Previously this was muddied due to the fact script ID's were the primary way to refer to scripts. Now the instance of a script and its mapping to a context is clearer.</p>
329
+
<p>This is reflected in a brand new set of bindings:</p>
330
+
<pre><codeclass="language-lua ignore">-- will create backing ScriptAttachment instances, that can be used in other bindings.
331
+
local entity_script = ScriptAttachment.new_entity_script(entity, script_asset)
332
+
local static_script = ScriptAttachment.new_static_script(script_asset)
0 commit comments