Search Unity

[Released] Ultimate Spawner 2.0 - Spawning Made Easy

Discussion in 'Assets and Asset Store' started by scottyboy805, Nov 26, 2019.

  1. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner 2.0 is a powerful asset that is feature package and makes adding spawning systems to your game easy. Ultimate Spawner 2.0 includes a number of useful spawner systems such as spawn points, spawn areas and more which are suitable for all your spawning needs, whether it be a 2D game or 3D. Our spawner hierarchy system allows you to create complex logical spawning systems with little effort saving you time and work over implementing custom solutions.

    SpawnPoint_Icon.png SpawnArea_Icon.png
    Spawn Point | Spawn Area

    Features
    • A complete easy to use spawning system
    • Quickly setup spawn locations and have your enemies spawning in no time
    • Occupied checks determine whether spawn locations are available for spawning
    • Using spawn masks you can easily specify which spawnable items are allowed at particular spawners
    • Create spawnable item collections where each item has a spawn chance value
    • Create hierarchical spawn systems where spawn requests can be delegated to child spawners
    • Hierarchical spawn systems allow for complex rule based spawning behaviours
    • Spawn triggers allow spawning only when the player is inside a bounding volume
    • Spawn targets allow distance based spawning for a particular target
    • Easily integrate pooling support
    • Highly customizable spawners
    • Suitable for 2D and 3D games
    • Fully commented C# source code
    • Comprehensive .chm API documentation

    Add Ons
    Extend the capabilities of Ultimate Spawner with the following add on packages:

    Ultimate Spawner 2.0 Waves Add-On
    Ultimate Spawner 2.0 - Waves Add-On is an expansion asset for Ultimate Spawner 2.0 and adds the ability to create wave based spawning systems which are created via a versatile node editor window. Learn more about this add-on on the asset store.

    Waves-AddOn-Large.png

    WaveGraph_Screenshot.png

    Old Version

    Isn't there already an Ultimate Spawner asset? Yes there is, however Ultimate Spawner 2.0 has been completley redesigned and is intended to replace the older version. In time this will mean that the older version will become depreciated, but don't worry. Customers who bought the older asset will recieve a reduced price upgrade to Ultimate Spawner 2.0

    disclaimer: Ultimate Spawner 2.0 is in no way compatible with the older asset which it will be replacing. It has been completley redesigned from the ground up with major changes.


    Created by Trivial Interactive for the Unity game engine.



    Developer Website | Support
    Please feel free to use this thead for feedback, suggestions, questions, asset support and anything else you may need regarding Ultimate Spawner 2.0
     
    Last edited: Feb 6, 2020
    TeagansDad likes this.
  2. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    665
    So is this useful for spawning everything from trees, foliage, rock, grass, buildings, treasure chests, treasure in containers and enemies, etc? Or is this only really good for treasure chests and enemies? If yes to all the above, can it perform bounds check, flatten terrain, optionally clear an area below what is being spawned (ex. a building would flatten and clear items underneath it) and change the terrain texture underneath? Nested spawners? How is the randomness handled and can you say, for example, that I only want one of one type of object and max 5 of another?

    Sorry, I know that's asking a lot but a run-time spawner like that would be amazing. :D
     
  3. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Hi,
    Yes this asset is capable of spawning anything really so long as you are willing to place spawn points or spawn areas thoughout the scene. It was desgined with enemies and gameplay items such as pickups in mind although there is nothing to limit what could be spawned. Alternativley there is also a navmesh spawning feature where you can randomly spawn an item on a nav mesh although there are no occupied checks for this feature. Occupied bounds checks are supported by spawn points and spawn areas using either phyics overlap checks or triggers. Flattening terrain is not something that is supported and I would think it is outside the scope of this asset. With the nested spawners the logic is completley configurable. You can have random spawner selection, distance based spawner selection, Sequential spawning and more. For item selection there is a chance value for each item which is used to determine how likley the item is to be spawned. You can also use a feature called spawn masks which allows you to specify which items can be spawned at individual spawners.

    Let me know if you have any more questions.
     
  4. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    665
    Thanks for the quick reply! Some of the other features I can add myself so it's no biggy. Sounds good, though.

    Any idea when it'll be ready?
     
    Last edited: Nov 26, 2019
  5. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    We are hoping to finsh things off by the end of the week so that it is ready for release but the submission process can take a while, maybe up to three weeks or more but hopefully it will be sooner.
     
    StevenPicard likes this.
  6. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    It took a little longer than expected but we have now finished all the documenation and final touches and have submitted Ultimate Spawner 2.0 for review. I am sure the asset store team will be very busy this time of year so I expect it will take atleast a couple of weeks before approval but hopefully it will be sooner.
     

    Attached Files:

    Last edited: Dec 19, 2019
    dsilverthorn and StevenPicard like this.
  7. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner 2.0 has now been approved and is llive on the asset store. Customers who purchased the older version of Ultimate Spawner will be able to upgrade for a reduced price. Keep an eye out for the 'Waves' add on which should be coming in the new year.

    Large.png
     
  8. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner version 2.0.1 has been submitted tot he asset store for review. This version contains some minor bug fixes:
    • Fixed a bug in the Infinite Spawn Controller where the 'Stop After Spawnable Count' option had no effect.
    • Fixed a bug in the Event Spawn controller where the 'OnEnd' event would not be triggered when the event was fired.
     
  9. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner version 2.0.2 has been submitted to the asset store. This version fixes bugs in the Spawn Area and Spawn Point where the spawn location information could be reset causing spawning to sometimes fail with the message 'No spawn location available'.
     
    digiross and dsilverthorn like this.
  10. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    288
    Do you have some plans for Despawner ?
     
  11. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    We had not really though about despawners but it is something that we could potentially add. What did you have in mind for this?
     
  12. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    288
    Let say you`re spawning different elements like Enemies, bullets, particles effect. It`s nice to be able to not only spawn at large but be able to track what is also destroyed, killed or vanished. It helps to keep inventory of what was spawn & despawned and can be useful as well to keep track of all objects if using a pool.

    - Enemies can be despawned if receiving a certain event like onKill()
    - Bullets can be despawned of touching something ( a collider)
    - Particles can be despawned after certain amount of time
     
  13. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    OK we should be able to add somthing like that quite easily.
     
    dsilverthorn and digiross like this.
  14. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    434
    Looking at this, I just found it and it looks pretty good.
    Thinking about picking it up but have a question just to verify.

    I'm looking for a spawner that can add ambient animals that are controlled by Emerald AI to roam and bring my scenes to life. But to spawn in when entering an area and despawn when area is left, this way I can add many varieties and increase the quantities of animals while minimalizing overhead.

    I think this is a good solution, but wanted to check before jumping in on it.
    Thanks!
     
  15. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Hi,
    Thanks for considering our asset.
    It is possible to spawn an item when the player (or any other object) enters a bounding volume which you can setup with physics triggers. You can use the built in 'Spawn Area' component where you can attach any number of physics trigger components to define your area. You can then attach one or more spawn locations to this area where your AI objects can be spawned. The only thing that is not included at the moment is despawning when the player leaves an area. We will be hoping to add many despawning features in the near future.

    I hope this helps you. Let me know if you have any more questions.
     
    dsilverthorn likes this.
  16. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    434
    Excellent! I do appreciate the quick answer.

    The despawning will be a big seller, especially when spawning AI characters and the like.

    Maybe you could add a separate area for the despawn? That way you can get far enough away and not have things just disappear in view.

    If you add despawning, it will be much better than the AI spawner Crux since it can do more than just AI and Crux only spawns per texture. This will give you a larger market, since you have a greater variety of options which which to spawn objects and creatures. :)

    I have subscribed to your forum and added this to my wishlist. I will keep an eye on the development.

    When you add despawning, I will be purchasing.:D Looking forward to it!!!
     
  17. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner 2.0 Waves Add-On has been submitted to the asset store. This add on will allow you to create wave spawning systems which are edited via a versatile node editor where you can create almost any type of wave spawning system you could imagine. This will be released as a standalone asset add-on package which will be purchased separatley.

    Waves-AddOn-Large.png

    We have also started work on adding despawners to Ultimate Spawner 2.0 which will be coming soon.
     
  18. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Ultimate Spawner 2.0 Waves Add-On is now available on the asset store.
     
    dsilverthorn likes this.
  19. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    434
    Can US2 be used to spawn buildings in a way that they will have separation control?
    Meaning that separation of object can be kept far enough apart by colliders or other means to be used to have a village that spawns and be different each time you play, for instance?
    Brain storming on ways to use this. :)
     
  20. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    I assume you mean that you cant place a spawned item on top of an already spawned building like many rts games? Ultimate Spawner can detect overlapping objects but at the moment it will only do this when attampting to spawn an item at a spawn point. IE before the item can be spawned, its bounding volume is checked for overlapping objects and the item can be spawned if there are no collisions. The spawn area component comes close to supporting this type of spawning behaviour but not quite. When you attempt to spawn an item in a spawn area, overlapping checks are performed for colliding objects as normal but instead of a spawn/no spawn result, the spawn area will attempt to find a free location within the bounds of the spawn area. We could look into adding pre-spawning ovelap checks in a future version.
     
    dsilverthorn likes this.
  21. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    434
    Thanks!
    Can it spawn several objects in an area randomly or only at spawn points?
    Like a herd of animals.
     
  22. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Yes that is exactly what the spawn area is designed for. It will randomly spawn an object within the area bounds using collision check to find a free space. You can also spawn randomly on a navmesh although there are no collision checks for this.
     
  23. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    434
    That is what I thought and wanted to verify it. That is what has drawn me to your solution. :)
    Now I'm waiting on the despawning!;)

    Thanks very much for your answers and keep up the good work!
     
  24. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    Hi, asset looks great but I have questions regarding NavMesh spawners. We are using NavMesh Components (from Unity) so there are multiple nav meshes in the scene, some of which are generated at run-time. Does US 2.0 support that case?
     
  25. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Hi,
    Multiple nav meshes are supported as the spawning system make use of the static NavMesh API for calculating spawn locations. We have not tested runtime generated meshes, however it should also work without issue as long as they are registered in some way so that the NavMesh type is aware of them. Ultimate Spawner will only uses the runtime NavMesh APIs for spawning on nav meshes and there are no edit time calculations required or anything like that so there should be no issue.

    I hope this helps you. Let me know if you have any more questions.

    Edit: If you do go ahead with Ultimate Spawner 2.0 and runtime nav meshes, there is a method you should call after you have generated your nav mesh: 'SpawnNavMesh.RebuildBounds'. This will ensure that the full area of the navmesh can be used for spawning.
     
  26. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    I see, but this seems like US 2.0 is treating all navmeshes as one? What if I want to use one spawner on one NavMesh (for one of enemy type) and other spawner for other NavMesh (for other enemy type)?
     
  27. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Yes that is correct. At the moment all navmeshes are treated as one just like when pathfinding. If you know of a way to access indivdual navmesh instances at runtime we could support both combined and individual nav meshes if that would be something you would require. perhaps the area mask can be used for this but we would have to look into it further unless you can offer any suggestions.
     
  28. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    What do you mean "just like pathfinding"? Since NavMesh Components were released, patfinding (of NavMesh Agents) is configurable per Agent type so that different shaped Agents use different NavMeshes. NavMeshes are also a part of GameObject and not the scene (since there are multiple different ones, possibly overlapping) so I am assuming US will not be able to access them using "old" navmesh api?
     
  29. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    Another question, this time regarding custom pooling: the problem for us is this: different types of objects are spawned in different ways: some from prefabs, some from Addresables and some even are procedural. We already have pools for them but it is not easy to integrate with US 2.0 as the only way seems to be global static hook function that takes a prefab Object as argument. Would it be possible to further push pooling customization. Say by being able to provide a ScriptingObject with GameObject Spawn() method instead of the Prefab to the Spawn Items List?
     
  30. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    We will have to look into it a bit but it sounds like we will be able to support individual nav meshes in that case. I just meant that the NavMesh type manages all navmeshes in the scene so I would assume that the area mask is used to filter out particular nav meshes.
     
    slimshader likes this.
  31. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    I'm not sure I understand what you want to achieve here. It sounds like you want to register a type that provides a spawn method for Ultimate Spawner to use for spawn requests? If this is the case then it would not really work without accepting a prefab parameter otherwise it would completley disregard the spawnable items and spawnable mask system used for filtering spawnable items on different spawners etc. Most pooling systems we have encountered maintain a collection of pooled items using the prefab asset as the key. Would it not be possible to lookup the correct spawn pool in your pooling event hook and call 'Spawn' on the managing pool. Let me know if I am missing something here.
     
  32. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    Nope you are perfectly correct about the need for prefab parameter in the case of spawn systems based on prefabs :) The issue, as I mentioned is when the instance spawned is not an Instantiate() of that prefab but for example from AddresaableAsset. I see you point about masks tho. Maybe the solution for us would be to use the prefabs passed to the spawnable items just strictly as an marker / key and then redirect based on that to the proper Spawner / Factory
     
  33. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    OK I understand now. We did not really think about addressables when developing US 2.0 so indeed there is no easy way to integrtate them. I think we could support them with changes to the spawnable items asset and by adding another Spawn method to all spawners that accepts an asset reference. We could then implement another pooling hook especially for addressable assets. Does that sound like something that could work?
     
  34. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    155
    The general solution I guess could be to allow 2 types of spawnble items in the list:
    1) current one, based on prefab and ratio
    2) ScriptableObject-based where that ScriptableObject represents spawner implentation, it could be as simple as
    Code (csharp):
    1.  
    2. public abstract class BaseSpawner : ScriptableObject
    3. {
    4.   abstract GameObject Spawn();
    5. }
    6.  
    and in case of that type of spawnable item, SpawnPoint would just call spawner.Spawn() instead of HandleSpawnerInstanitate(prefab).

    Masks could still be configured with those BaseSpawner assts to filter the list.

    For now tho, I think the solution is this:

    create a prefab with custom spawner MonoBehaviour deriving from some base, for example:

    Code (csharp):
    1.  
    2. public abstract CustomSpawner : MonoBehaviour
    3. {
    4.   public abstract GameObject Spawn(Vector3 pos, Quatrnion rot);
    5. }
    6.  
    7. public class ResourcePathSpawner : CustomSpawner
    8. {
    9.   public string Path;
    10.  
    11.   public override GameObject Spawn(Vector3 pos, Quatrnion rot)
    12.   {
    13.     // load from Resources by Path
    14.     // instantiate
    15.   }
    16. }
    17.  
    then for the instatiation handler in US 2.0:

    Code (csharp):
    1.  
    2. Object HandleSpawnerInstanitate(Object prefab, Vector3 position, Quaternion rotation)
    3. {
    4.   return ((GameObject)prefab).GetComponent<CustomSpawner>().Spawn(position, rotation)
    5. }
    6.  
    this approach requires no changes in US 2.0 and allows for all the flexibilty needed at the cost of calling GetComponent<T>() so not too bad ;)
     
  35. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    652
    Thanks for the detailed response. Both ideas could work well but in the first example I think we would need the types to inherit from a common base type. For example: There is a SpawnableItem instance stored for each enemy/spawnable item you create in the spawnable items asset. Each instance stores a prefab reference representing the object to spawn so that the spawner has the necessary information. In order for the first example to work I believe you would need to store similar information for addressable prefabs such as addressable name or addressable reference and then the necessary information would exist to spawn the particular item.
    I think the way to go for this would be to add a new AddressableSpawnableItem class which can be added to the spawnable items asset. The we could implement a common base type like 'ISpawnableItem' which requires spawn methods to be implemented. Something like this:

    Code (CSharp):
    1. public interface ISpawnableItem
    2. {
    3.     GameObject Spawn(Vector3 pos, Quaternion rot);
    4. }
    5.  
    6. // This type already exists in US 2.0 but the spawn implementation is delegated to SpawnableItems at the moment.
    7. public class SpawnableItem : ISpawnableItem
    8. {
    9.     public GameObject prefab;
    10.  
    11.     public GameObject Spawn(Vector3 pos, Quaternion rot)
    12.     {
    13.         return UltimateSpawner.UltimateSpawnerInstantiate(prefab, pos, rot) as GameObject;
    14.     }
    15. }
    16.  
    17. public class AddressableSpawnableItem : ISpawnableItem
    18. {
    19.     public AssetReferenceGameObject addressable;
    20.  
    21.     public GameObject Spawn(Vector3 pos, Quaternion rot)
    22.     {
    23.         IAsyncOperation<Gameobject> task = addressable.Instantiate<GameObject>(pos, rot);
    24.    
    25.         // A better way would be needed but this is just an example
    26.         while(task.isDone == false);
    27.    
    28.         return task.result;
    29.     }
    30. }
    31.  
    Having a common base type would allow us to store mixed items in the spawnable items asset. For pooling though we would likley need to implement another instantiate hook event that can be overriden or go with your custom spawner approach.

    The custom spawner method you suggest sounds like a good approach to support pooling but would that work for addressables? How would you end up with the addressable prefab instance and being able to call CustomSpawner. Spawn on it without some additional addressable storage and loading code being implemented? Or would both approaches work hand in hand. Ie similar code that I added above and then support pooling via CustomSpawners?

    I appreaciate your thoughs.
     
unityunity