Get an in-depth overview of the most commonly needed functionality of the Unity Object Pooling API (UnityEngine.Pool namespace) introduced in the 2021 version of the Unity Editor.
In this video you'll learn:
🧰 What Object Pooling is
🧰 Why you need Object Pooling
🧰 How to use the 2021 Object Pooling API
🧰 Some things I wish were included in the API, but are not
The key benefit of having a built-in API for object pooling is you no longer have to roll your own solution, nor purchase one from the asset store! Unity now provides a high performance, easy to use API to pool all kinds of things!
💸 Ongoing sales 💸
⚫ See all active asset sales on the Asset Store: assetstore.uni...
⚫ Save 25% off your first Asset Store Order: prf.hn/click/c...
⚫ Save up to 50% on NEW Assets: assetstore.uni...
👨💻 As always, all code from this video is available on GitHub: github.com/lla...
❤ Believe in LlamAcademy's mission and have received value from the videos? Become a Patreon Supporter or RU-vid Member:
⚫ Patreon: / llamacademy
⚫ RU-vid Member: / @llamacademy or click the Join button on any video
----
Most tutorials come from knowledge gained making survival.llama... Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets (affiliate link): assetstore.uni...
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment #optimization
Chapters:
00:00 What is Object Pooling and Why Do You Need it?
01:51 Using the New API
02:38 Object Pool Constructor & Callbacks
04:41 Scene Overview
05:29 Bullet.cs
07:10 BulletSpawner.cs - Variables
07:50 BulletSpawner.cs - Spawning Bullets Without a Pool
10:26 Scene & Physics Setup
11:18 Demo and Profiling No Object Pool
11:56 Bullet.cs - Converting to Support Destroy or Disable
12:17 BulletSpawner.cs - Adding an Object Pool
15:42 BulletSpawner.cs - Using Pooled Bullets
16:00 BulletSpawner.cs - Showing Pool Stats
16:25 Performance Comparison and Improvements I'd Like to See In The API
18:45 Closing
17 авг 2024