gavi
New Member
Posts: 12
Posts: 12
|
Post by gavi on Apr 27, 2020 12:49:08 GMT
Hello,
I am having problems using PoolBoss.
I have got 5 prefabs.
I added them to poolBoss under one category.
When the scene starts, there are 2 error messages:
"You have more than one instance of 'xxxxx' in Pool Boss. Skipping the second instance."
There is only one PoolBoss in my scene.
I added the original PoolBoss prefab to my scene, then I unpacked it, changed name, and then saved the scene gameobject as my own PoolBoss prefab (to prevent problems with newversions of pool boss).
I unpacked all my prefabs and I recreated them again, then I added them again to PoolBoss: same error.
I unpacked all my prefabs, changed their transforms a bit, and I recreated them again, then I added them again to PoolBoss: same error.
When I look at the instances of my gameobjects inside the PoolBoss gameobject in my running scene, there are 3 out of 5types.
When I try to instatiate one of the types that was giving the error, PoolBoss.SpawnInPool() instantiates it but uses the wrong prefab type, and sometimes returns 'null' as transform.
I reimported all assets. same error.
I am using Odin: is it becuause of it?
What should I do?
|
|
|
Post by DarkTonic Dev on Apr 27, 2020 15:27:22 GMT
That error shows if you have named more than 1 prefab in Pool Boss the same thing. Categories don't matter.
For instance, in our Example Scene, if you added "Robot Kyle" prefab to pool boss twice, you would get the error.
I know nothing of Odin, but it shouldn't cause this. Show me a screen shot of your Pool Boss Inspector with all the prefabs showing if you can't figure it out.
SpawnInPool only returns null if there are no clones left to spawn (all clones already spawned).
-B
|
|
gavi
New Member
Posts: 12
Posts: 12
|
Post by gavi on Apr 27, 2020 17:37:14 GMT
Thank you for the prompt reply. My impression is that the problem I had was different then adding the same prefab twice: each prefab was added once. My problem was that I was not aware of PoolBoss adding the component "PoolableInfo" to the prefab. So when I duplicated a prefab and then I changed it from its original version, the copy still contained "PoolableInfo" (with the name of the first prefab). I did unpack all prefabs, changed their names and repacked them, but that was not useful because the PoolableInfo was still there, with the same one old name in two different prefabs.
Anyway, all solved now, thank you for the clarifications and for the prompt support.
|
|
|
Post by DarkTonic Dev on Apr 27, 2020 18:10:48 GMT
Ah ok. You can also use the "reset component" functionality on that component to let it refresh if the prefab name changed. Or remove the component and it will recreate automatically.
|
|