New version of Spawner is currently being sent to the Asset Store, this version brings with it support for Pool Manager by Path-o-Logical Games. You will have to buy a copy of it in order for it to be used, with one simple uncomment in a single file you can benefit from improved performance with regards to instantiating and destroying of GameObjects. This will improve performance on mobiles and the like.
Version 1.5:
Support for Pool Manager
Support for adding a transform to specify where to spawn, if it is null (empty) uses the spawner GameObject
Small improvement to the SpawnAI component.
With Pool Manager installed and set up, I have seen increases in time for frames by around 0.5 to 2.0 milliseconds.
I’ve started working on a CoRoutine version that will replace the current Update() method, however I seem to be running into problems with TimedWaves not adhering to their times and instead of 10 seconds (as testing) it occasionally spawns at around 6 seconds.
As soon as version 1.5 has been approved on the asset store I am going to push version 1.6 to the asset store, I have improved the documentation within Docs.zip slightly and hopefully improved the performance of the Spawner by switching out Update() with a coroutine.
I know, either there is a massive backlog of new assets to be reviewed by the Unity staff or there has been some weird error. Hopefully 1.6 will be available sometime this week.
It was designed as a plug and play integration, as soon as you uncomment that line it will start to use a Spawn Pool by the name of SpawnedEnemy as defined in InstanceManager by poolName. If you want to create a predefined SpawnPool just ensure it is named the SpawnedEnemy.
I just tested the above functionality and it works as expected. You can then add a Pre-Prefab Pool Option for a Spawn Unit. I might work on some functionality for Spawner where it will automatically perform this in order to prespawn the maximum number of units. That way it will become even more of a plug and play setup.
Great news to hear that you’re improving the support in 1.7. One feature I would love to see is the ability have different spawners pull from different spawn pools.
Would you like to be able to set an entire unique Pool Name per a spawner or would you be happy with a simple appending of the Spawner ID to the end of the preset Pool Name? Currently the preset Pool Name is SpawnedEnemy, with the second option it will become SpawnedEnemy-1 and so on.
I’m currently making it possible for the InstanceManager to handle both cases, now its just setting up the Spawner to be able to handle those. With this however means that there will have to be changes to the SpawnAI and so forth to handle getting the new pool name associated with that unit and so forth. Unless I make a massive change to how the system “destroys” units and move all that code to the Spawner and simply pass the transform of the Unit along to the Spawner and everything happens there.
Won’t it be less efficient than simply having all the spawners using the same pool? That way they share objects and so on?
On a side note, did some stress testing this side with 8 Spawners attempting to spawn 25 units each, because of the kill time on each unit they never really spawn 25 each. I’m getting around 100 FPS at 9-10ms a frame.
If I had to put more time into Spawner and release say a paid for version of it, what features would you like to see in that version or this one and how much would you be willing to pay for a high quality Spawner system?
If you set it to spawn Normal and set the total number of enemies to 1 it should only spawn one enemy indefinitely until you tell it to stop spawning.
The reason you getting the error is because you need to have a method on your Enemy that is called SetID that receives an integer. You will then need to call kill function on the spawner with that integer in order to “delete” the enemy and make it spawn again.
There is a component that comes with the system that handles all that functionality provided that you call the Remove function on it when you destroy your Enemy.
In order to use the component, simply add it your Enemy Prefab. Then make use of GetComponent, to get a reference to the SpawnAI on the enemy uni, in your main AI component that is on the enemy and call Remove function. This will handle interacting with the Spawner(s) and handle respawning and so forth.
Thx for this! If you are looking to make a paid version of this it would be nice to have a better wave spawner. For example if I want to spawn 3 easy enemies at the same time but have it pick from 6 different locations(that I can assign). But every enemy would be at a different location, and not spawn on top of each other. Another feature that would come in handy is being able to randomly pick the amount of enemies. Say every time a wave spawns it can be between the amount X and Y.
I would pay 15 bucks if you add these features.
P.S. Is there an easy way to add more assign units? If not that should be a feature too. Like a button on the UI.
I know this probably seems a little silly because it is probably super simple but I am still learning the ropes. I need a little help trying to make the spawner work. I am not sure what scripts to add to what and I don’t even know if I put the gizmos folder into the right spot. (The documentation explained to put the gizmos folder into the root of the assets folder, but I am not sure how to do this.) Like I said I know it is probably very simple, but any help with this would be much appreciated. Thanks!