(Better) Object Pooling - I Didn't Like My Old Solution

https://www.youtube.com/watc...
Object pooling is an easy way to get a performance boost in Unity or any other game engine. Reusing objects is faster than constantly creating and destroying objects. This method requires no object pool manager, allows easy initialization, and most important allows objects to automatically return themselves to the pool. Using C#, interfaces, actions, and generics this solution is highly extendable and easy to use. Object Pool Code On Github: https://github.com/onewheelstudio/Adventures-in-C-Sharp/tree/main/Object%20Pool%202 Generics Video: https://www.youtube.com/watch?v=6ED4Qo0Yi6o Actions/Events Video: https://www.youtube.com/watch?v=UWMmib1RYFE Want to support the Channel? ******************************* Buy me a coffee: https://www.buymeacoffee.com/onewheelstudio Shop the Unity Asset Store (affiliate): https://assetstore.unity.com/top-assets/top-paid?aid=1100lHSw Become A Channel Member: https://www.youtube.com/channel/UCkr9CPPqT9VWUjkpo3HcACg/join Or a Patron: https://www.patreon.com/onewheelstudio My video and streaming kit: https://kit.co/onewheelstudio/tutorial-video-production Buy a Game Design Book: https://kit.co/onewheelstudio/game-design-reading-list-unity-c-blender-and-more Video Gear List (Amazon Affiliate) *********************************** Sony A6100 Camera: https://amzn.to/32logXz Sigma 16mm 1.4 Camera Lens: https://amzn.to/3KA4Wr4 GoXLR (audio interface): https://amzn.to/35dmr03 Shure SM7B Mic: https://amzn.to/3fNbV1E Blue Mic Arm: https://amzn.to/3tHgwdQ Neewer Light: https://amzn.to/3rD8eRv Light Softbox: https://amzn.to/3GUaHgQ Neewer RGB Light: https://amzn.to/3rCTQJ9 Other Links ************ Discord: http://discord.onewheelstudio.com Twitter: https://twitter.com/OneWheelStudio Devlog: https://onewheelstudio.com/ Twitch: https://go.twitch.tv/onewheelstudio Timestamps ************* 0:00 Why? 0:48 What is Object Pooling? 1:18 Implementation 2:16 Interfaces 2:29 IPool 2:51 IPoolable 3:21 Object Pool Class 4:29 Constructors 4:51 Pull Function 5:47 Push Function 6:31 Pool Object 7:35 Pull Function Overloads 8:07 Using Pull & Push Actions 8:30 THE END #GameDevelopment #Unity3D #indiedeveloper
I'm just one guy making games with Unity in his spare time. I first opened Unity in 2013 and fell in love. This channel grew from making videos to support my real-world students - so they could work more independently. I've taught with Playmaker, Bolt and most recently the class has moved to C# - which matches the evolution of this channel. My goal is to make clear, concise videos minus the usual BS. Got questions? Like what you see? Come join the discussion on Discord: discord.onewheelstudio.com I also produce custom tutorial videos and currently produce the Odin Inspector tutorials. Need a tutorial, promo or review video? Find more information at: https://onewheelstudio.com/customvideos
Fracture the Flag
Currently working on Fracture the Flag
Fracture the Flag is not the usual hyper click fest of an RTS... Take some time, gather your resources, plan your strategy and then knock the crud out your opponents!
https://store.steampowered.com/app/...
Subscribers
Patreon
https://www.patreon.com/onewheelstudio
28 patrons
28,00 € per month