intothedev / object-pooling-for-unity Goto Github PK
View Code? Open in Web Editor NEWObject Pooling for Unity
License: MIT License
Object Pooling for Unity
License: MIT License
I'm not sure if there is an easy way or not already, but it would be great if the Populate method could also take in a transform parameter to set the parent of the game object being instantiated, as it would be good to clear up the hierarchy.
Unity 2021.1 contains some really useful classes and interfaces for creating pools. I wonder if they may be of use once 2021.1+ turns LTS?
https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Pool.IObjectPool_1.html
https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Pool.ObjectPool_1.html
I'd be happy to make a PR with some adapters and things down the line if that's something you'd be interested in?
Thanks for this superb library!
Request a function to clean up all cached objects. The reason is the game I am working on has hundreds of enemy and environment object types, it is however in each stage only a few will be selected from the set, and rarely reuse in the next stage.
Therefore cached leftover objects will be overwhelming after the game running a prolonged period of time. It would make sense for me to have a function to cleanup all cached objects or re-init the pool.
Please kindly consider.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.