Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News - Blog: Scalable content management with Unity addressables

#1
Blog: Scalable content management with Unity addressables

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.jpg" width="469" height="250" title="" alt="" /></div><div><p><strong><i><small> The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.<br />The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company. </small></i></strong> </p>
<hr>
<p data-css="tve-u-16f3e240c36">[Read the original post on <a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/">Unity Addressables Prefabs</a>]</p>
<p data-css="tve-u-16f3e240c36">Do you have a Christmas present for your players? Well, just make sure it’s not a memory crash. Those happen when greedily using countless assets from the store. Don’t dump the assets, just adopt a clever strategy with Unity Addressables Prefabs.</p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/"><img alt data-css="tve-u-16f3e23d3c8" data-id="4309" height="250" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.jpg" title="Unity-Addressables-Prefab-Thumbnail" width="469"></a></p>
<p data-css="tve-u-16f3e241e13">It’s pretty&nbsp;easy to go crazy buying assets in the asset store. I’ve been guilty of purchasing some discounted bundles this month. You keep adding stuff to your cart and you know how it goes.</p>
<p>What is common is to miss the problems that come afterward, though.</p>
<p>Integrating assets in your projects is always in detriment of your players who have the&nbsp;<strong>least capable hardware</strong>. Adding content decreases the performance characteristics of your game. And if you go wild adding content, you’ll exclude players from playing your game. And these people will be angry, trust me.</p>
<p data-css="tve-u-16f3cd1cf73">The key is to engineer a proper content management strategy.</p>
<p data-css="tve-u-16f3cc2aea2">That said, here’re some&nbsp;<strong>signs you don’t have a scalable content management strategy</strong>:</p>
<ul>
<li data-css="tve-u-16f3cc6b2ac">The&nbsp;<strong>loading times</strong>&nbsp;of your game increase and become unbearable (&gt;30s)</li>
<li data-css="tve-u-16f3cc6b2ac">You get reports of players experiencing random&nbsp;<strong>crashes</strong></li>
<li data-css="tve-u-16f3cc6b2ac">Your user checks on Tinder and comes back to your game only to see that Android/iOS&nbsp;<strong>killed&nbsp;</strong>it and they lost all their&nbsp;<strong>progress</strong></li>
<li data-css="tve-u-16f3cc6b2ac">Your development&nbsp;<strong>iteration times</strong>&nbsp;explode (time-to-play over 15s)</li>
</ul>
<p data-css="tve-u-16f3cd4f355">When you experience these symptoms, it’s time to upgrade your game to the next level.</p>
<p data-css="tve-u-16f3cc2aea2">Integrate any&nbsp;<strong>smart content management strategies</strong>:</p>
<ul>
<li data-css="tve-u-16f3cc6b2ac">Use&nbsp;<strong>additive scene loading</strong>&nbsp;as I detailed&nbsp;<a href="https://thegamedev.guru/unity-architecture/a-better-architecture-for-unity-projects/" target="_blank" rel="noopener noreferrer">here</a></li>
<li data-css="tve-u-16f3cc6b2ac">Implement&nbsp;<strong>Asset Bundles</strong></li>
<li data-css="tve-u-16f3cc6b2ac">Leverage the power of&nbsp;<strong>Unity Addressables</strong></li>
</ul>
<p>There’s a fourth option that is not really an option.&nbsp;<strong>Do not use the Resources</strong>&nbsp;directory/API.</p>
<p>In this post, I’ll show you how to profit from the most modern option. We’ll be leveraging the power of&nbsp;<strong>Unity Addressable Prefabs</strong>.</p>
<p>The project setup used in this post is simple. The user can spawn or despawn copies of two types of prefabs: a tank or a soldier.</p>
<p>So, you expect memory usage to go up when you spawn the tanks. And you also assume the memory to sink when you despawn them, right?</p>
<p>Nope. That’s how Unity works.</p>
<p>But luckily, you can make it work that way with Unity Addressable Prefabs.</p>
<p data-css="tve-u-16f3ce2345f">Below is a memory profile comparison animation showing the result with and without Addressables. See for yourself.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.gif"><img alt="Default vs. Addressables-Based Content Management" data-css="tve-u-16f37cc44f1" data-id="4308" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4308&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="192" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.gif" title="Addressables-Gains" width="600"></a></p>
<p><em>Default vs. Addressables-Based Content Management</em></p>
<p data-css="tve-u-16f3e315fcc"><strong>This is only two random prefabs. Any guess what happens with your real game assets?</strong></p>
<p>Let’s see how you get to pay only for what you use.</p>
<p><strong>Quick Navigation (redirects)</strong></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-2" rel="nofollow">Level 1 Developer: Traditional Workflow</a></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-3" rel="nofollow">Level 2 Developer: Unity Addressables-Based Prefabs</a></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-0" rel="nofollow">Addressing Prefabs</a></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-4" rel="nofollow">Replace Direct With Indirect References</a></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-5" rel="nofollow">Add Pre-Loading And Post-Release Phases</a></p>
<p><a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-6" rel="nofollow">Level 3 Developer: Unity Addressables Reference Counting</a></p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.png"><img alt="Unity Traditional Content Management (Level 1)" data-css="tve-u-16f3cda528e" data-id="4321" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4321&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="338" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables.png" title="Unity-Addressables-Prefabs-Level-1" width="600"></a></p>
<h2 id="tab-con-2">Level 1 Developer: Traditional Workflow</h2>
<p>In Unity it’s straightforward to add references to your new content. You can easily link meshes, materials, prefabs to your scripts. And then you spawn them in run-time to add enemies, bullets and all the like.</p>
<p data-css="tve-u-16f3cf90b0a">The problem is that&nbsp;<strong>you pay the memory price constantly&nbsp;</strong>whenever that reference is alive in your scene. It doesn’t matter if your asset is currently&nbsp;spawned in the level, you still pay it. See the high memory base cost below.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-1.png"><img alt="Traditional Content Management: Profile (Level 1)" data-css="tve-u-16f3cf8a512" data-id="4328" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4328&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="182" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-1.png" title="Unity-Addressables-Prefabs-Level-1-Profile" width="600"></a></p>
<p>Traditional Content Management: Profile (Level 1)</p>
<p><strong>That’s the #1 reason your game won’t scale.</strong></p>
<p data-css="tve-u-16f3db7258b">The level 1 scene contains a manager that takes care of spawning/despawning the prefabs. Find below its code.</p>
<pre><code class="language-cs">public class Level_1_HandlePrefabLifecycleTraditional : MonoBehaviour { [SerializeField] private Transform spawnAnchor = null; [SerializeField] private float separation = 1f; [SerializeField] private int instanceCount = 10; [SerializeField] private GameObject prefabReference = null; List&lt;GameObject&gt; _instances = new List&lt;GameObject&gt;(); public void HandleLifecycle() { var hasSpawnedInstances = _instances.Count &gt; 0; if (hasSpawnedInstances) { Despawn(); } else { Spawn(); } } private void Spawn() { for (var i = 0; i &lt; instanceCount; i++) { var newGameObject = Instantiate(prefabReference, spawnAnchor.position + i *separation * Vector3.right, spawnAnchor.rotation); _instances.Add(newGameObject); } } private void Despawn() { foreach (var instance in _instances) { Destroy(instance); } _instances.Clear(); } }</code></pre>
<p>As you can see, there’s nothing wild going on there. It’s just the traditional flow of handling the lifecycle of your game objects.</p>
<p>A reference to the prefab, an instantiate and a destroy call.</p>
<p>That’s all you need to eventually make your game unscalable.</p>
<p>Ideally, we should only pay for the content that we actually&nbsp;use. How can we achieve this?</p>
<p>Let’s find out in the next section.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-2.png"><img alt="Unity Addressable Prefabs: Manual Management (Level 2)" data-css="tve-u-16f37cc44ef" data-id="4318" height="391" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-2.png" title="Unity-Addressables-Prefabs-Level-2" width="694"></a></p>
<h2 id="tab-con-3">Level 2 Developer: Unity Addressables-Based Prefabs</h2>
<p>Addressables is a relatively new Unity package that will help you implementing smart content management strategies.</p>
<p>There’s no special diploma required to get started with Addressables. Just follow my&nbsp;<a href="https://thegamedev.guru/unity-addressables/tutorial-learn-the-basics/" target="_blank" rel="noopener noreferrer">Unity Addressables Tutorial</a>&nbsp;and you will&nbsp;be set for the journey in a matter of a few hours. I’ll assume you know the basics and have the Addressables package installed.</p>
<p>In this section you and I will update the traditional code of the previous section to the Addressables era.</p>
<p>We will follow the next steps:</p>
<ol>
<li>&nbsp;“<strong>Address</strong>” the original tank and soldier prefabs</li>
<li><strong>Replace&nbsp;</strong>the direct references to the prefabs with indirect references.</li>
<li>Add&nbsp;<strong>loading&nbsp;</strong>and&nbsp;<strong>release&nbsp;</strong>phases.</li>
</ol>
<h3 id="tab-con-0">Addressing Prefabs</h3>
<p>This is the easiest step.</p>
<p data-css="tve-u-16f3da39dab">Once you have the Addressables package installed, you’ll see a new inspector option to mark your assets as Addressable. This will add your prefab to the addressables database.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-1.gif"><img alt="Setting up Unity Addressable Prefab" data-css="tve-u-16f3da87ff7" data-id="4331" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4331&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="298" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-1.gif" title="Unity-Addressables-Addressing-Prefab" width="600"></a><em>Setting up Unity Addressable Prefab</em></p>
<h3 id="tab-con-4">Replace Direct With Indirect References</h3>
<p>In the previous code, we had a direct reference to our prefab.</p>
<p>That direct reference causes the increased memory base cost.</p>
<p data-css="tve-u-16f3da996b9">So we’ll get rid of it. Just like that.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
</td>
<td>
<p><code>// Remove direct references</code></p>
<p><code>// [SerializeField] private GameObject prefabReference = null;</code></p>
<p><code>// Add indirect reference instead</code></p>
<p><code>[SerializeField] </code><code>private</code> <code>AssetReference prefabReference = </code><code>null</code><code>;</code></p>
</td>
</tr>
</tbody>
</table>
<p data-css="tve-u-16f3da7bd8a">This step alone will power up your inspector (provided you remove the non-compiling code). You’ll soon be able to assign the new indirect reference to your prefab like below.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-2.gif"><img alt="Assigning Unity Addressable Prefab Reference" data-css="tve-u-16f3da2f9a3" data-id="4371" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4371&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="449" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-2.gif" title="Unity-Addressables-Assigning-Direct-Reference" width="593"></a>Assigning Unity Addressable Prefab Reference</p>
<h3 id="tab-con-5">Add Pre-Loading And Post-Release Phases</h3>
<p data-css="tve-u-16f3db75d89">We now have to finish modifying our spawn and despawn functions to take advantage of the indirect reference.</p>
<pre><code class="language-cs">public class Level_2_HandleAddressablesPrefabLifecycleManually : MonoBehaviour { [SerializeField] private Transform spawnAnchor = null; [SerializeField] private float separation = 1f; [SerializeField] private int instanceCount = 10; [SerializeField] private AssetReference prefabReference = null; // Indirect reference private AsyncOperationHandle&lt;GameObject&gt; _asyncOperationHandle; private readonly List&lt;GameObject&gt; _instances = new List&lt;GameObject&gt;(); public void HandleLifecycle() { var hasSpawnedInstances = _asyncOperationHandle.IsValid(); if (hasSpawnedInstances) { Despawn(); } else { Spawn(); } } private void Spawn() { _asyncOperationHandle = prefabReference.LoadAssetAsync&lt;GameObject&gt;(); _asyncOperationHandle.Completed += handle =&gt; { var prefab = handle.Result; for (var i = 0; i &lt; instanceCount; i++) { var newGameObject = Instantiate(prefab, spawnAnchor.position + i *separation * Vector3.right, spawnAnchor.rotation); _instances.Add(newGameObject); } }; } private void Despawn() { foreach (var instance in _instances) { Destroy(instance); } _instances.Clear(); Addressables.Release(_asyncOperationHandle); } }</code></pre>
<p data-css="tve-u-16f3e1fdb05">Here’re a few explanations about the new manager:</p>
<ul>
<li><strong>Line 6&nbsp;</strong>contains the indirect reference as I shown you in the previous point. We assign the prefab in the Unity inspector.</li>
<li><strong>Line 8&nbsp;</strong>contains an&nbsp;<em>AsyncOperationHandle</em>&nbsp;variable we use to keep track of our prefab memory loading/release operation. It is specialized to track a prefab (<em>GameObject</em>).</li>
<li>In&nbsp;<strong>line 13</strong>&nbsp;we ask whether the&nbsp;<em>AsyncOperationHandle</em>&nbsp;is valid, i.e. it the prefab data is loaded.</li>
<li>In&nbsp;<strong>line 26</strong>&nbsp;we start loading the prefab data based on the indirect reference of line 6. We store this handle for the future memory release. Note this is an asynchronous process, that’s why…</li>
<li>… We add a callback in&nbsp;<strong>line 27</strong>&nbsp;so Unity notifies us when the prefab data has been loaded. In&nbsp;<strong>line 29</strong>&nbsp;we then access the loaded prefab through the&nbsp;<strong>Result field&nbsp;</strong>passed by the callback. The result field will always contain the data we initially asked for, in our case a&nbsp;<em>GameObject</em>&nbsp;prefab.</li>
<li>Instantiate and Destroy work exactly as shown in the Traditional Workflow (Level 1).</li>
<li>When despawning, we also release the data we loaded in&nbsp;<strong>line 45</strong>. For that, we pass the&nbsp;<em>AsyncOperationHandle</em>&nbsp;we stored in line 26.</li>
</ul>
<p>The result?</p>
<p data-css="tve-u-16f3dc6136a">A&nbsp;<strong>variable memory</strong>&nbsp;cost based on what we actually&nbsp;need. And it is always below the traditional workflow approach.</p>
<p><a href="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-3.png"><img alt="Addressables-Based Content Management: Profile (Level 2 &amp; 3)" data-css="tve-u-16f3dc5cc69" data-id="4329" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4329&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="182" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-3.png" title="Unity-Addressables-Prefabs-Level-2-3-Profile" width="600"></a><em>Addressables-Based Content Management: Profile (Level 2 &amp; 3)</em></p>
<p>This code though… it’s ugly, to say the least. In other situations, we also risk releasing the prefab data before we destroy all instances.</p>
<p>If we release the prefab memory that is currently&nbsp;being used by its instances, nothing beautiful will come out of that.</p>
<p>So let’s see how we can get this to the next level.</p>
<p><img alt data-id="2090" height="91" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-4.png" title="logo-alone-transparent" width="63"></p>
<p><strong>Summary</strong></p>
<ul>
<li data-css="tve-u-16f3deaf5ea">Traditional content management doesn’t scale with memory</li>
<li data-css="tve-u-16f3deaf5ea">Use Addressables to pay only for what you use</li>
<li data-css="tve-u-16f3deaf5ea">Profit from faster loading and iteration times with Addressables</li>
</ul>
<p><img alt="Unity Addressable Prefabs: Reference Counting (Level 3)" data-css="tve-u-16f3cdaee16" data-id="4319" data-tcb-events="__TCB_EVENT_[{&quot;t&quot;:&quot;click&quot;,&quot;a&quot;:&quot;thrive_zoom&quot;,&quot;c&quot;:{&quot;id&quot;:&quot;4083&quot;,&quot;size&quot;:&quot;full&quot;}}]_TNEVE_BCT__" height="338" src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/blog-scalable-content-management-with-unity-addressables-5.png" title="Unity-Addressables-Prefabs-Level-3" width="600"></p>
<h2 id="tab-con-6">Level 3 Developer: Unity Addressables Reference Counting</h2>
<p>I have a proposal for you.</p>
<p>Let’s&nbsp;<strong>delegate</strong>&nbsp;some of the memory management responsibilities to Unity. Let’s focus our time on our game instead.</p>
<p>How do we do this?</p>
<p>By getting rid of the traditional&nbsp;<em>Instantiate</em>&nbsp;and&nbsp;<em>Destroy</em>&nbsp;calls. We will use the Addressables equivalents for those:&nbsp;<a href="https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.AddressableAssets.Addressables.html#UnityEngine_AddressableAssets_Addressables_InstantiateAsync_System_Object_Transform_System_Boolean_System_Boolean_" target="_blank" rel="noopener noreferrer"><em>InstantiateAsync</em></a><em>&nbsp;</em>and&nbsp;<a href="https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.AddressableAssets.Addressables.html#UnityEngine_AddressableAssets_Addressables_ReleaseInstance_GameObject_" target="_blank" rel="noopener noreferrer"><em>ReleaseInstance</em></a>.</p>
<p>The advantage of the new API calls is that they have memory&nbsp;<strong>reference counting</strong>&nbsp;built-in.</p>
<p>That means, you cannot mess up (but don’t try hard).</p>
<p>When all instances using your prefab are gone, Unity will unload the prefab data automatically.</p>
<p>Instancing works similarly. If there’s no previous instance alive, Unity will load the prefab first and then instantiate it. If there was an existing prefab, then it skips the loading phase as it is already in memory.</p>
<p data-css="tve-u-16f3dd21137">We can&nbsp;<strong>simplify&nbsp;</strong>the code to this:</p>
<pre><code class="language-cs">public class Level_3_HandleAddressablesPrefabLifecycleReferenceCounting : MonoBehaviour { [SerializeField] private Transform spawnAnchor = null; [SerializeField] private float separation = 1f; [SerializeField] private int instanceCount = 10; [SerializeField] private AssetReference prefabReference = null; private readonly List&lt;GameObject&gt; _instances = new List&lt;GameObject&gt;(); public void HandleLifecycle() { var hasSpawnedInstances = _instances.Count &gt; 0; if (hasSpawnedInstances) { Despawn(); } else { Spawn(); } } private void Spawn() { for (var i = 0; i &lt; instanceCount; i++) { var asyncOperationHandle = prefabReference.InstantiateAsync(spawnAnchor.position + i *separation * Vector3.right, spawnAnchor.rotation); asyncOperationHandle.Completed += handle =&gt; { _instances.Add(handle.Result); }; } } private void Despawn() { foreach (var instance in _instances) { Addressables.ReleaseInstance(instance); } _instances.Clear(); } }</code></pre>
<p data-css="tve-u-16f3dd21137">The biggest change is in the&nbsp;<em>Spawn</em>&nbsp;method. Instead of using&nbsp;<em>LoadAssetAsync&nbsp;</em>first, we directly call&nbsp;<em>InstantiateAsync&nbsp;</em>in&nbsp;<strong>line 27</strong>. As you already know, Unity will take care of its loading if needed.</p>
<p>As with the traditional&nbsp;<em>Instantiate</em>&nbsp;method, we pass the position and rotation parameters. We just skip the prefab argument, as we’re invoking it on the&nbsp;<em>prefabReference</em>&nbsp;object itself.</p>
<p>When loading and instantiation are complete, we add the new instance to our list.</p>
<p><strong>Line 36</strong>: Despawning works by calling&nbsp;<em>Addressables.ReleaseInstance</em>&nbsp;with the instantiated game object as its parameter. This function will take care of releasing memory for you if the reference (or game object instance) count drops to 0.</p>
<p>The result?</p>
<p>Our memory profile will look exactly the same, but our code will indeed&nbsp;be sexier.</p>
<p>Note there’s a small&nbsp;<strong>performance hit</strong>&nbsp;by using reference counting, but unless you’re spawning thousands of these objects, you can stick to this simpler method.</p>
<p>I suggest you <a href="https://thegamedev.guru/unity-addressables/prefabs-to-scale-your-game/#tab-con-6">grab&nbsp;the&nbsp;<strong>full U</strong><strong>nity project</strong></a>&nbsp;to test this yourself.</p>
<p>And that should be it for today.&nbsp;</p>
<p>Take care,<br /> Ruben</p>
</div>


https://www.sickgaming.net/blog/2019/12/...ressables/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016