<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Run code when the 3D scene is ready]]></title><description><![CDATA[<p dir="auto">For every 3D project, before we can run any 3D block, we have to initialize the 3D scene.</p>
<p dir="auto">For example, if we try to run these blocks to add a box at the beginning of the program, the box will not be added successfully, because when the “add box” block runs, the scene has not been completely initialized.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a0d9d193-3f46-46fb-9182-b25d39ef5c8a.png" alt="858ce899-8302-4a88-90b1-96022ad00bd9-image.png" class=" img-responsive img-markdown" width="774" height="336" /></p>
<p dir="auto"> </p>
<p dir="auto">To run any code after the 3D scene has completed initialization, you can attach them to this block:</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/28fc6ba4-e183-432a-80b1-e665298beb84.png" alt="73dafdb6-d9a7-4f72-8548-d0a9b5d5b3aa-image.png" class=" img-responsive img-markdown" width="291" height="105" /></p>
<p dir="auto"> <br />
For example, this is the revised program that adds a box right after the scene has been initialized:</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/ff13071b-dd60-4d74-bc3a-90bcdd965d93.png" alt="e20774de-55ca-4e18-b9c6-9681d26f733a-image.png" class=" img-responsive img-markdown" width="757" height="327" /></p>
<p dir="auto"> <br />
Note that you can also use this block in other sprites, and it will always wait until the 3D scene is ready.</p>
]]></description><link>https://forum.creaticode.com/topic/858/run-code-when-the-3d-scene-is-ready</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 00:15:16 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/858.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Mar 2023 03:38:39 GMT</pubDate><ttl>60</ttl></channel></rss>