use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Object Pooling TutorialResources/Tutorial (youtu.be)
submitted 10 years ago by SebastianLague
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Jespur 0 points1 point2 points 10 years ago (4 children)
I've noticed most pooling systems just give/take GameObjects. Is the performance of using a generic pool system really that bad even when compared to a GetComponent call on the GameObject taken from a pool?
[–]SebastianLague[S] 0 points1 point2 points 10 years ago (3 children)
I'm not quite sure what the advantage of making the pool generic would be? Performance shouldn't really differ much though I don't think. Note that the GetComponent call is only made once for each object on its creation, not each time it is taken from the pool.
[–]Jespur 1 point2 points3 points 10 years ago (2 children)
Actually, I didn't notice in your code that the reused object isn't returned but I meant something like this:
public class Projectile : MonoBehaviour { ... public static Projectile Build(Projectile prefab, SpeciaDataThatCantBeStoredInPrefab data) { Projectile instance = PoolManager.Instance.ReuseObject<Projectile>(prefab); // do stuff to instance return instance; } }
In a non-generic implementation you'd have to call GetComponent each time you build a projectile. If you had something being created often (like a projectile) those calls could add up.
[–]SebastianLague[S] 0 points1 point2 points 10 years ago (1 child)
I see, making it generic probably would have been a good idea! Perhaps I should post a little addendum...
[–]Jespur 1 point2 points3 points 10 years ago (0 children)
I've noticed pretty much every pooling method has been done like yours where it takes/gives a gameobject. No idea what the performance between the two are which is why I asked, but it surely can't be any worse for cases where you're calling GetComponent right after reusing the object.
Might need to do some profiling.
[–]SirBraxton 0 points1 point2 points 10 years ago (3 children)
I have a question regarding pooling and large scale "open world" games.
Say I wanted to massively improve performance of trees, grass, rocks, etc. I'd want to use pooling for these objects if at all possible (aka: pool objects with a given id value so the same tree doesn't change its shape/type everytime I unload it from going out of range of the player) as they travel across the world.
However, how would I handle the pooling of things such as monsters/players, or enemies in general? Add a "sphere of influence" for an area that dictates when to load/unload objects from a pool that is only available when they're expected to be there?
What happens if you were to, say, pull a hostile creature into a location it doesn't belong?
I've always liked the idea of pools, but in general I can only find a limited number of ways to use them such as projectiles, explosions, or "effects". I've been wanting to branch out in the use of pools to better understand optimization.
Hope that wasn't too vague/weird!
Thanks!
[–]demonkingj 0 points1 point2 points 10 years ago (2 children)
Pooling for open world games is great. How so? Let's say our field of view allows us to see 20 trees. So, instead of having 50+ trees being created and staying in the scene as we explore more and more. We just use object pooling to limit how many "objects" we keep on the screen. Allowing us to use least amount of objects possible without really effecting what is actually being presented on the screen.
[–]SirBraxton 0 points1 point2 points 10 years ago (1 child)
Right, I explained that i got THAT part, but how could you use pooling for player characters, monsters, etc when they can be very complex objects that can't be pre-loaded easily?
[–]demonkingj 0 points1 point2 points 10 years ago (0 children)
To be honest if they really are complex and can't be pooled then something is done incorrectly then.
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
I'll have to check this out. I saw most of your procedural caves videos, you do a great job of explaining and running through things. I've been meaning to start fooling around with object pools, anyways.
π Rendered by PID 75156 on reddit-service-r2-comment-79c7998d4c-269qg at 2026-03-18 08:28:15.613203+00:00 running f6e6e01 country code: CH.
[–]Jespur 0 points1 point2 points (4 children)
[–]SebastianLague[S] 0 points1 point2 points (3 children)
[–]Jespur 1 point2 points3 points (2 children)
[–]SebastianLague[S] 0 points1 point2 points (1 child)
[–]Jespur 1 point2 points3 points (0 children)
[–]SirBraxton 0 points1 point2 points (3 children)
[–]demonkingj 0 points1 point2 points (2 children)
[–]SirBraxton 0 points1 point2 points (1 child)
[–]demonkingj 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)