public void Despawn (Transform transform, int poolID)
{
if (transform != null)
ObjectPolls [poolID.Despawn (transform.gameObject);
}--
You received this message because you are subscribed to the Google Groups "Hydrogen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hydrogen-framew...@googlegroups.com.
To post to this group, send email to hydrogen-...@googlegroups.com.
Visit this group at http://groups.google.com/group/hydrogen-framework.
To view this discussion on the web visit https://groups.google.com/d/msgid/hydrogen-framework/db6d5c01-d444-4f43-9521-ecbc394cd890%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hmm that does sound like an interesting problem :) I haven't seen it myself but this is a good idea none the less :DI'll add some checks for null to all of them in an upcoming release.
On Wed, Feb 26, 2014 at 2:51 PM, Hunter Luisi <hlu...@gmail.com> wrote:
I've been having a issue where sometimes the object pool singleton will spawn a new game object on application quit (in the editor). I solved this by checking for null on the Despawn methods. For example:public void Despawn (Transform transform, int poolID)
{
if (transform != null)
ObjectPolls [poolID.Despawn (transform.gameObject);
}Hope this helps.H
--
You received this message because you are subscribed to the Google Groups "Hydrogen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hydrogen-framework+unsub...@googlegroups.com.