Hey.
I've written an object pooler based on the tutorials here. I needed a simple one, and that did the trick.
Problem is, there are a few scripts calling for an object from the cache. Only the first to arrive gets the object, and the other gets a null reference exception (I'll include the error).
When the one that did get an object, calls for another object, it works.
So I might be missing something obvious, or maybe there's some racing condition happening... I'd love for some feedback....
Object Pooling - Exception After First Call
I've written an object pooler based on the tutorials here. I needed a simple one, and that did the trick.
Problem is, there are a few scripts calling for an object from the cache. Only the first to arrive gets the object, and the other gets a null reference exception (I'll include the error).
When the one that did get an object, calls for another object, it works.
So I might be missing something obvious, or maybe there's some racing condition happening... I'd love for some feedback....
Object Pooling - Exception After First Call