|
Post by bud on Jun 9, 2017 12:29:43 GMT
I will try to keep this exact:
1) I created a Gameobject that has a particle effect. 2) I have a despawn script on the GameObject. 3) my enemy spawns the GameObject as a projectile. 4) All works as expected. 5) My player has a collision script. 6) the projectile hits the player and the player collision script calls a despawn function in the gameobject. 7) the gameobject does not despawn. 8) the function is called as I print it to console. 9) if I place my despawn code in the gameobject update function as a test it despawns fine. 10) I use :PoolBoss.Despawn(this.GetComponent<Transform>());
So, the question is why does this do this ? As said the function on the gameobject is called from the player collision script and I can see it being called via print statement. But the despawn does not work, this is driving me nuts !
thanks
|
|
|
Post by wa5hburn on Jun 9, 2017 12:31:18 GMT
Just to add, obviously I added the gameobject to the pool.
|
|
|
Post by DarkTonic Dev on Jun 9, 2017 17:07:16 GMT
Turn on the logging for PoolBoss and see what it says when it tries ti despawn. There may be a problem. I can't guess why it wouldn't work though. I've never had a problem.
|
|