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:
    1,193
    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: Aug 11, 2020
    smichaelg and TeagansDad like this.
  2. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    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:
    1,193
    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:
    859
    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:
    1,193
    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:
    1,193
    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:
    1,193
    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:
    1,193
    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:
    1,193
    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:
    335
    Do you have some plans for Despawner ?
     
  11. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    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:
    335
    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:
    1,193
    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:
    839
    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:
    1,193
    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:
    839
    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:
    1,193
    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:
    1,193
    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:
    839
    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:
    1,193
    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:
    839
    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:
    1,193
    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:
    839
    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:
    187
    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:
    1,193
    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:
    187
    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:
    1,193
    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:
    187
    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:
    187
    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:
    1,193
    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:
    1,193
    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:
    187
    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:
    1,193
    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:
    187
    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:
    1,193
    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.
     
  36. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Is despawning still a possibility?
    Just checking in, hope you are all doing well.
     
  37. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Yes it is still in development but we have been busy with other assets for the past few weeks. We are now working on an update to Ultimate Spawner which will add better pooling support and support for addressables as well as a new spawner. Despawning may be included too or it could be in the update following this but hopefully will not be too long now. It just depends how things go.
     
  38. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Thanks. I appreciate the update.
     
  39. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.1.0 has been submitted to the asset store for review and should be available for download within a day or two. This version includes:

    This version contains breaking changes. Upgrading an existing project will cause all spawnable items assets to become invalid. Take a look the Upgrade Guide section of the user guide for details.
    • Major changes to the spawnable items asset in order to support a new feature.
    • Spawnable items assets can now accept a prefab asset or a SpawnableItemProvider scriptable object asset to allow more control over item creation and destruction. You can inherit from SpawnableItemProvider, create a scriptable asset from the resulting script and register with the spawnable items asset to have full control over the item creation process.
    • Changes to the item creation process so that nav mesh agents are initialized at spawn locations correctly.
    • Added a new spawner 'SpawnerBounds'. This is a spawner intended for larger areas and will spawn an item at a random location within the setup bounds.
    • Added a new spawner 'Spawner Collider Bounds'. This is a spawner that is able to spawn an item at a random location within the shape of a collider. This means that you can spawn items inside sphere shapes or even more complex shapes defined by a convex mesh collider. This spawner requires a 3d collider to be attached to the same object which should preferably be a trigger if spawned items will also have colliders attached.
    Despawners will be coming in the near future.
     
  40. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.0 has been submitted to the asset store for review and should be available within a day or two. This version includes:
    • New feature 'Despawners'. As requested, we have now added despawner components to Ultimate Spawner 2.0.
    • Added despawner 'Despawn After Time'. You can use this component to despawn an item after a given amount of time.
    • Added despawner 'Despawn After Amount'. You can use this component to despawn an item after when a hard limit is reached. When the number of a particualr item in the scene exceeds the specified maximum, the first spawned object of matching item type will be despawned. This is useful for creating auto recycling effects such as bullet holes while limiting resource usage.
    • Added despawner 'Despawn On Collision'. Causes an item to be despawned when a collision event occurs. Supports 2D and 3D colliders.
    • Added despawner 'Despawn On Trigger'. Causes an item to be despawned when a trigger event occurs. Supports 2D and 3D colliders.
    • Added despawner 'Despawn On Event'. Can be used in conjunction with Unity event or animation events to despawn an item whe an event occurs.
    • Added spawner 'Spawn Transform. A bare bones spawner that essentially allows you to use a transform as a spawn location without all the overhead of occupied checks. Useful when used in conjunction with 'Despawn After Amount' for systems like bullet spawners.
    • Added API's for spawning and despawning items using the correct item creation provider. Use 'UltimateSpawner.Spawn' and 'UltimateSpawner.Despawn...' methods for correct item creation and destruction.
    If we have missed out any despawner functionality then let us know and we could protentially add it in the next update.
     
    f1chris, digiross and dsilverthorn like this.
  41. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I have just purchased the ultimate spawner 2 and the wave spawner add-on. I am following the docs for the wave spawner now. The user guide states: "In order to create a wave sequence using the wave graph editor window you will first need to create a Wave Graph asset where all of the data will be stored."

    Is using the Wave Graph the only way to create a wave?
    If so, where is the "most important node", the Start Node located when creating a new one? My graphs do not seem to have a start node, and there is no option in Create one! To get around this, I have duplicated the default WaveConfig and modified the copy. making it loop 10 times.

    using my little work-around, how would I go about getting the current wave count for display in a TextMeshProUGUI.text field?
     
  42. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Thanks for purchasing our assets.

    Yes, at the moment you will need to use the node graph editor to build your wave spawning behaviours. You could possibly do it by code too but it would be alot more work and documenation does not exist for that at the moment.

    The start node should be automatically created the first time you open a wave graph asset but if that is not happening for you then it sounds like a bug. If you could let me know which Unity version you are using then we will look into that.

    To get the current wave number to display in your UI, you will need a reference to the 'WaveSpawnController' that is running your wave graph. You can add a public variable of type 'UltimateSpawner.WaveSpawnController' and then assign it via the inspector which is probably the easiest way. Once you have this reference you can use all the properties of the controller such as 'CurrentWave', 'CurrentWaveSpawnedItemCount', 'CurrentWaveDestroyedItemCount', etc to get the information you require. You can also add listeners to the events of this controller such as 'OnWaveStarted' and 'OnWaveEnded'.

    I hope this helps you. Let me know if you have any more questions and if you could let me know your unity version we will look into that start node issue.
     
  43. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    @scottyboy805 I am using Unity 2019.3.12f.

    I am also receiving warnings when trying to use Trigger Volumes. I setup a Spawn Trigger Volume containing a Spawn Point object. I gave the Trigger Volume a sphere collider and marked it as trigger. It is 30 units in diameter and buried halfway into my terrain. I moved the spawn point several units out from the trigger, and it turns green when I adjust the height to be just above the terrain.

    I have the same "SpawnItem" that I successfully used in the wave spawner, no mask, Random spawn mode. Player is the only tag. On the Spawn Point, I have "is static" and "above ground" checked, 0.5 radius, Physics Overlap, Default for collision layer, full rotation. I added a debug.log to tell me when I hit the trigger.

    Nothing spawns, but I do see the debug. Stopping the game and selecting the Spawn Item button on the Trigger results in a warning:
    Failed to spawn - No available spawn location
    UnityEngine.Debug:LogWarning(Object)
    UltimateSpawner.Spawning.SpawnerGroup:Spawn(SpawnableItemRef) (at Assets/UltimateSpawner2.0/Scripts/Spawning/SpawnerGroup.cs:223)
    UltimateSpawner.Editor.SpawnerInspector:GUISpawnInformation() (at Assets/UltimateSpawner2.0/Scripts/Editor/Inspector/SpawnerInspector.cs:294)
    UltimateSpawner.Editor.SpawnerInspector:OnImGUI() (at Assets/UltimateSpawner2.0/Scripts/Editor/Inspector/SpawnerInspector.cs:41)
    Trivial.ImGUI.ImInspectorWindow`1:OnInspectorGUI()
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)​

    Clicking on the Spawn Item button in the Spawn Point spawns the item correctly.
    What stupid human trick did I do to get it wrong?
    Mark
     
  44. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Thanks, We will look into that and see if we can reproduce the problem.

    Is there a suitable physical object inside the trigger collider that would cause it to activate? Trigger volumes are only designed to spawn an item when a triggering physical object such as the player is inside it. I asume that any layers and tags are set correctly? It is a bit difficult to visualize what the problem could be without seeing it so would you be able to send us the project or a reduced version that has this behaviour and we can take a look at it in more detail? If so, then please send it to us via email: info(at)trivialinteractive.co.uk and we will look into it further.
    Maybe you could also take a look at the demo scene at 'Assets/UltimateSpawner2.0/Demo/SpawnTriggerVolumeDemo.unity' to compare setups.
     
  45. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    @Mad_Mark We were able to reproduce the issue where the start node was not created and have now fixed the problem. We will be submitting an update shortly to fix this.
     
    dsilverthorn likes this.
  46. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.1 and Ultimate Spawner - Waves add-on 2.0.1 have been submitted to the asset store for review and should be avialable within a few days. These versions include:

    -Fixed a bug in the waves add-on where creating a wave graph asset in later Unity versions would not create the essential StartNode that is required for all graphs.
    -Fixed an error on import from the waves-add on caused by a breaking change in the previous udpate of the core asset.
    -Added a new despawner to the core asset 'DespawnDistance' which as the name suggests, can be used to depsawn items based on distances to SpawnerTargets such as players or other objects.
     
    dsilverthorn likes this.
  47. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Turns out, you use a Trigger CONTROLLER not a Trigger VOLUME for physics collision detection. I should have kept reading the manual instead of stopping just because I found something that said "Trigger". RTFM
    Thanks Scott for replying to my email so fast.
     
    scottyboy805 likes this.
  48. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    No problem, Glad you were able to get it working.
     
  49. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner version 2.2.2 has been submitted to the asset store. This version includes:
    • Added a warning to the TriggerController when there is no suitable trigger collider attached for consistency. The warning will be displayed in the inspector window just like spawn triggers.
    • NavMesh spawning now supports spawning items within range of a SpawnerTarget. This allows you to set a min and max distance (or just max) to a target object so that objects always spawn near but not too close. This is ideal for spawning items such as pickups near a player but not on top of them.
    • NavMesh spawning now supports occupied checks via physics overlaps. Note that due to the way this works, it is possible for a spawn request to fail as a result of exceeding the maximum number of attempts. This is very rare though so generally will not be an issue.
    • Added a custom property drawer for the nav mesh area mask field. You can now select areas via name such as 'Walkable'.
    • Added a new demo scene demonstrating nav mesh spawning using ranged based distancing from a target object
     
    dsilverthorn likes this.
  50. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    That's excellent, I have current wave number, as well as current enemy count displaying in the UI. How would I get the maximum wave count to display?

    Mark