Prefab Pools plugin, add randomness and probability to your spawners!

Edit: This plugin is removed and no longer for sale.

Prefab Pools plugin is live and can be found here. It will be at an amazing $2 initially! The normal price will probably be $5.

Documentation can be found here:

What is it? Prefab Pools is the solution to simple-minded spawners!

Key Features are:

  1. Instantly add variations to your spawners! Instead of using a single prefab, pull one out of a group you specify.
  2. Weighting tells the pool that Prefab A should spawn four times as often as prefab B.
  3. True random prefab selection or ordered selection.
  4. 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.

Works on both Unity 3 4!

Make Something Killer!

Prefab Pools V1.0 has just been submitted to the Asset Store. Here are some images to give you a better idea of what it does.

Prefab Pools is live and is $2 initallly. Get it at the introductory price! Here’s the link:

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.

Thank you!

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

John G, I went ahead and submitted an update to Prefab Pools - V1.1 to the Asset Store. It has the following change:

  1. Allows you to specify “no prefab” for a weighted pool item.

This allows you to do “% chance of spawning certain item” with nothing spawning in other cases. For example you could set up a Prefab Pool like this:

  1. one pool item with a weight of 1 and a rocket launcher power-up as the prefab.
  2. one pool item with a weight of 4 and no prefab.

If you spawn an object from this Prefab Pool now, you have a 20% chance of getting the power-up. The other 80% of the time, you will get nothing.

V 1.1 is live on the Asset Store with the above updates :slight_smile:

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

Thanks

I think for that one, you’ll need to ask the author of ObjectPool? Unless I’m misunderstanding…

sorry for not being clear, Im just trying to work out how to use a pool system with this even a simple one i cant seem to get it to work :confused:

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…

But otherwise the tool works great :slight_smile:

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.

Yea that’s exactly how the pool manager works but the thing I was unsure about how to use them both together that’s all, thanks for the fast replies :slight_smile:

Ok, I hope you’re clear now. Let me know if you have any other questions!

Awesome thanks :slight_smile:

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 :slight_smile: Master Audio is also 80% off!