prime31 / recyclerkit Goto Github PK
View Code? Open in Web Editor NEWObject pool manager for Unity
License: MIT License
Object pool manager for Unity
License: MIT License
Unless I'm wrong about your intentions, you seem to not want this pooler to be sold as part of separate asset/kit. BUT CC-by-nc-sa also prevents its usage in any commercial game whatsoever. Either you should get some lawyer to write you license that actually says what you want (expensive) or get some other license that actually lines up with what you want.
Also please note that CC license seems to not be very good for code according to Creative Commons themselves. I disagree, but "nc" part of the license you're using makes me unable to utilize it in the game I'm working on, even though the code's quality seems to be great and it's very easy to use..
Attribution-NonCommercial-ShareAlike 3.0
and
You are free to use RecyclerKit in any and all games that you make. You cannot sell RecyclerKit directly or as part of a larger game asset.
That isn't the same as my understanding of NC - you intend to allow use in commercial games as long as the asset isn't sold - but that distinction isn't part of the CC-NC licence terms. Unless I've misunderstood somewhere?
(CC licences are tricky for code and CC themselves advise against it: https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software )
Anyway - sorry to be the licence geek and thanks for offering this to the community in any form!
Using:
TrashMan.despawnAfterDelay( gameObject, lifetime );
Sometimes it works, other times it doesn't. I can't locate the issue reading through the code. Sorry can't be more helpful, not sure what to look for as to why it doesn't despawn. Using Unity 5.2.
Hi,
I ran into an issue that if I enter the DemoScene from another scene, whatever I have on the TrashMan editor settings are gone. Not sure if it is something related with serializing and deserializing the settings, even though it works on Play on DemoScene. Thanks.
I added a Prefab that has 2 particle systems as childeren inside the prefab. But I always get this error message when I enable RecycleparticleSys. Would be nice to detech Child particle systems and not add them separately.
automaticallyRecycleParticleSystems is true but there is no ParticleSystem on this GameObject!
UnityEngine.Debug:LogError(Object)
TrashManRecycleBin:spawn() (at Assets/Scripts/TrashManRecycleBin.cs:192)
TrashMan:spawn(Int32, Vector3, Quaternion) (at Assets/Scripts/TrashMan.cs:136)
TrashMan:spawn(GameObject, Vector3, Quaternion) (at Assets/Scripts/TrashMan.cs:227)
Hi,
In TrashManRecycleBin's line number 214, you compare return value of Peek with null but I face an error with this line saying that "Operation is not valid due to the current state of the object" and it's thrown when the _gameObjectPool is empty.
I think we should instead compare it's count property against zero. I trust your C# skills are far better than mine so I'm not sure abut this and probably I'm missing something but doing this edit apparently solved me problem.
So to sum it up, I think:
while( _gameObjectPool.Peek() != null )
should change to:
while( _gameObjectPool.Count > 0 )
Thanks.
Hello.
I wanted the ability to have more then 1 TrashMan instance available at once. This comes from doing some DontDestroyOnLoads, and additive loading, where for some Global items i want a TrashMan, but also on a scene/level by level basis i would like some TrashMan instances.
I've made the data into a class member. I've also added a bunch of cleanup code, to remove instances of RecycleBins from the class data members.
Feel free to check out my branch for examples.
Any comments or questions, or alternative ways of accomplishing what i did are welcome! Thanks for this great library.
I have no idea why, but in the editor, every few play-throughs spawn will return null instead of a GameObject. Deleting the bins from Trashman and recreating them fixes the problem, but it always returns a few plays later. Bit of a deal-breaker!
Using the main branch, on a Windows standalone .exe I get "attempted to spawn go XXX but there is no recycle bin setup for it. Falling back to Instantiate" any time I try to spawn an object. Works in the editor so my only guess would be that the instance id is different on the build?
Hi,
Since I've added RecyclerKit to my game, sometimes objects that are spawned out of the pool, get disappeared. I tried very hard but can't trace the problem. Is this a known bug? How can I track it?
Thanks.
Hello guys,
I just updated my project to unity 5.1.3f and I face this issue.
Could you please help me check this issue.
In some cases OnLevelWasLoaded (in TrashMan.cs) may be called after a scene object's Awake call (I'm not sure exactly what causes this). If that happens then the _instanceIdToRecycleBin is cleared out after the prefab pool has been initialized and this causes all spawn calls to think that the prefab instance ids are not available due to _instanceIdToRecycleBin being empty.
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.