What is it? Prefab Pools is the solution to simple-minded spawners!
Key Features are:
Instantly add variations to your spawners! Instead of using a single prefab, pull one out of a group you specify.
Weighting tells the pool that Prefab A should spawn four times as often as prefab B.
True random prefab selection or ordered selection.
Simple spawner script included that utilizes the prefab pools.
Supports all export platforms with superb performance for mobile games.
Note - if you have the Killer Waves plugin, this is already included in that plugin.
Why are we putting this out as a separate plugin when it’s in Killer Waves already? Because we noticed that even for games that have no need of the other Killer Waves features, Prefab Pools are ALWAYS desired in just about every game idea.
Can this be used as a weapon spawn point, where you can give it weapon type a percentage chance eg 90% or 25% of spawning.
If so can it be set that 2nd item wont spawn after x amount of time then destroy first item if still at spawn point.
Not sure I understand the 2nd item time question. There is no time delays built into this very inexpensive product, only the weighted random spawning. If you want time delays, you should get our Killer Waves plugin. There is a free version without all the advanced features, however only the paid version includes Prefab Pools. Also the timed self-destruction you described is included in Killer Waves but not this plugin.
You also cannot spawn nothing with this. What you can do is specify that you want a cool weapon to spawn 25% of the time, however the other 75% of the time you will need to spawn something, but it doesn’t have to be a weapon. It could be some coins or other pickup.
Also, Killer Waves plugin also has controls for “% chance to spawn something”, which is what you’re after.
wow cool just what I needed now that the other popular poolmanager is no longer supported for unity 3.5 !
If you could make a few playmaker actions that would be awesome!
thanks a lot!
ow wait I minute I already have killer waves, I guess I could just use that, but I like to keep the pooling simple, would the killerwaves playmaker actions work on this one too?
This is not similar to Pool Manager. This does not get around instantiating and destroying objects. You would still use Pool Manager or similar plugin for that part. This helps to instead of spawning a single “hard-coded” prefab, you can make a pool of prefabs to choose from, each with their own weight (for probability).
I was considering whether I should add functionality similar to Pool Manager to the paid Killer Waves package, but I figure that most people already have Pool Manager so it’s not worth the effort.
Regarding Playmaker, since the Prefab Pool doesn’t physically spawn anything (only returns a reference to a Transform to spawn from a spawner), I’m not sure that it makes sense to add Playmaker actions into this. Killer Waves of course has the Playmaker actions for the spawners themselves.
I think it would be cool for 3.5 users to have an actively supported pool manger, and a little competition is healthy, so if it’s not too much work please add pooling capability like pool manger
Hey,
EDIT: I should learn to read -_-', So im trying to use this with a pool manger i just cant get my head around how i could add the prefabs to the pool in the start function?
Currently trying to use this pool manager here
Have you looked at PrefabPoolSpawner.cs in the example scene? That shows how to grab a random prefab from Prefab Pools. Then all you need to do is use that prefab with a line of code from your Pool plugin of choice. Do you know how to spawn things from that Pool plugin you’re using? I can only advise on Pool Manager as it’s the only one I’ve used.
So in the PrefabPoolSpawner.cs it uses if (prefabToSpawn != null) {
GameObject.Instantiate(prefabToSpawn.gameObject, this.trans.position, prefabToSpawn.rotation);
}
the pool manager im using uses for example “ObjectPool.Spawn(bulletPrefab);” now if i use that to spawn it, its not technically pooled though is it? since no where did the objects get pooled to begin with…
As I said, I don’t know how your Pool plugin works, but this example does work with Pool Manager. Here’s how.
With Pool Manager you specify for each prefab, how many to create when the scene starts. They are created and disabled. Then when you pass a prefab to Pool Manager to spawn, if it’s one of the prefabs that it has already created pool instances of, it spawns (enables) one of the instances. I assume your Pool plugin works the same. If it does not, then yeah this isn’t going to work. If that’s the case I suggest you get a better Pool plugin.
This plugin, as well as the free versions of our Killer Waves and Master Audio plugins, have been removed from the Asset Store due to our insanity sale. If you want Prefab Pools and don’t have it, you’ll need to purchase Killer Waves, which happens to be on 77% off sale right now Master Audio is also 80% off!