raymond
Junior Member
Posts: 53
Posts: 53
|
Post by raymond on Sept 5, 2020 20:38:02 GMT
Hello,
I have a question regarding "TriggerSpawner V2"
I am using a Trigger Enter Event to spawn objects from the Prefab Pools. I would like to spawn the objects as a child of the spawner. As of now they spawn as children of PoolBoss. Is there a selection to get them to spawn as a child of the spawner. I know you have the option to "Spawn Outside" in the Spawn Settings but this just unparents them from PoolBoss.
Thanks, Raymond
|
|
|
Post by DarkTonic Dev on Sept 6, 2020 3:59:35 GMT
No, there's no option for that because it would screw up the prefab.
Like when the parent prefab despawns, it would still have the children attached to it, so they would despawn too and also be there when it respawns, which is totally messed up.
I mean it's possible that we could add an option to take care of that (unparent when parent dies), but there would likely be weird edge cases that would be unsolvable. If you think it's very important, let me know and we can add it to the roadmap somewhere.
-Brian
|
|
raymond
Junior Member
Posts: 53
Posts: 53
|
Post by raymond on Sept 6, 2020 6:39:53 GMT
Thanks for the reply. I will try to figure something else out instead of having you add something iffy to your asset. I was thinking of writing a simple spawn script that pulls randomly from the prefab pool and then add it as a child and then when done, despawn that child game object back to PoolBoss.
I don't think that would cause issues. Do you?
Thanks, Raymond
|
|
|
Post by DarkTonic Dev on Sept 6, 2020 8:11:59 GMT
That should be fine and I've written scripts like that before for our first game.
|
|