Skip to content

Commit a6854d6

Browse files
committed
deploy: c289bc4
1 parent a29bb59 commit a6854d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+690
-355
lines changed

Examples/introduction.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ <h1 id="examples"><a class="header" href="#examples">Examples</a></h1>
193193
<i class="fa fa-angle-left"></i>
194194
</a>
195195

196-
<a rel="next prefetch" href="../Migration/guides.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
196+
<a rel="next prefetch" href="../ReleaseNotes/guides.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
197197
<i class="fa fa-angle-right"></i>
198198
</a>
199199

@@ -207,7 +207,7 @@ <h1 id="examples"><a class="header" href="#examples">Examples</a></h1>
207207
<i class="fa fa-angle-left"></i>
208208
</a>
209209

210-
<a rel="next prefetch" href="../Migration/guides.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
210+
<a rel="next prefetch" href="../ReleaseNotes/guides.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
211211
<i class="fa fa-angle-right"></i>
212212
</a>
213213
</nav>
Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ <h1 class="menu-title">Bevy Scripting</h1>
147147
<a href="https://github.com/makspll/bevy_mod_scripting" title="Git repository" aria-label="Git repository">
148148
<i id="git-repository-button" class="fa fa-github"></i>
149149
</a>
150-
<a href="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+
<a href="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">
151151
<i id="git-edit-button" class="fa fa-edit"></i>
152152
</a>
153153

@@ -316,17 +316,36 @@ <h2 id="scriptcallbackevent-changes"><a class="header" href="#scriptcallbackeven
316316
/// Whether the callback should emit a response event
317317
pub trigger_response: bool,
318318
}
319+
</code></pre>
320+
<h2 id="bindings-changes"><a class="header" href="#bindings-changes">Bindings Changes</a></h2>
321+
<h3 id="scriptid"><a class="header" href="#scriptid">ScriptId</a></h3>
322+
<p><code>script_id</code> is replaced with <code>script_asset</code> which now has a type of <code>Handle&lt;ScriptAsset&gt;</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>
324+
<pre><code class="language-lua ignore">-- prints: "my_script.lua"
325+
print(script_asset:asset_path())
326+
</code></pre>
327+
<h3 id="scriptattachment"><a class="header" href="#scriptattachment">ScriptAttachment</a></h3>
328+
<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><code class="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)
333+
</code></pre>
334+
<h3 id="system-builder"><a class="header" href="#system-builder">System Builder</a></h3>
335+
<p>the system builder no longer accepts script id's as parameters. Instead it accepts script attachments</p>
336+
<pre><code class="language-diff lua">-system_builder("my_callback", "this_script_id.lua")
337+
+system_builder("my_callback", ScriptAttachment.new_static_script(script_asset))
319338
</code></pre>
320339

321340
</main>
322341

323342
<nav class="nav-wrapper" aria-label="Page navigation">
324343
<!-- Mobile navigation buttons -->
325-
<a rel="prev" href="../Migration/guides.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
344+
<a rel="prev" href="../ReleaseNotes/guides.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
326345
<i class="fa fa-angle-left"></i>
327346
</a>
328347

329-
<a rel="next prefetch" href="../ScriptingReference/introduction.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
348+
<a rel="next prefetch" href="../ReleaseNotes/0.15.0.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
330349
<i class="fa fa-angle-right"></i>
331350
</a>
332351

@@ -336,11 +355,11 @@ <h2 id="scriptcallbackevent-changes"><a class="header" href="#scriptcallbackeven
336355
</div>
337356

338357
<nav class="nav-wide-wrapper" aria-label="Page navigation">
339-
<a rel="prev" href="../Migration/guides.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
358+
<a rel="prev" href="../ReleaseNotes/guides.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
340359
<i class="fa fa-angle-left"></i>
341360
</a>
342361

343-
<a rel="next prefetch" href="../ScriptingReference/introduction.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
362+
<a rel="next prefetch" href="../ReleaseNotes/0.15.0.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
344363
<i class="fa fa-angle-right"></i>
345364
</a>
346365
</nav>

0 commit comments

Comments
 (0)