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
    Hi,
    Glad those properties were useful to you.
    Getting the total number of waves is not supported at the moment. This is because the number of executed waves can vary depening upon condition and looping nodes causing the actual wave total to be dynamic. The same wave nodes can be used multiple times when chained under a loop node and conditions can prevent some wave nodes from running at all. We could probably add a property to return the total number of wave nodes in the graph if this would be useful to you.
     
  2. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Thanks for the quick response. If it is possible, I would appreciate the add. Since it may be only useful in some scenarios, perhaps a simple "isLooping" bool can be used to enable the "totalWaves" int? Then it only shows up or is accessible when there is no wave looping.

    My actual use case is if the player clears all of the waves (10), then they will have 5 minutes to find a specific NPC and interact with them. If they fail to interact, then the waves start again, repeating the entire scenario. If they succeed, the level is marked "cleared", their score is increased, and they progress to the next scene. This will be true for every scene in the game.

    Mark
     
  3. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ok, we can add something like that. We will probably add a property that returns the actual number of wave nodes in the graph regardless of whether they are used mutliple times.
     
  4. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner Waves add-on 2.0.2 has been submitted to the asset store. This version adds a 'TotalWaveCount' property to the wave spawn controller and returns the total number of connected wave nodes in the graph. Useful for getting the wave total when explicit waves are used.
     
  5. JuliusIbidus

    JuliusIbidus

    Joined:
    Jun 3, 2018
    Posts:
    49
    Hello, I purchased your asset and am running into a new error in my project. When I build I receive this message (see pic). I am using Unity 2019.3.7f1. I have read about this and it seems that it is caused by scripts that reference 'using UnityEditor' being outside folders named 'Editor', but I can't seem to find any scripts in Spawner 2.0 that reference this outside of it's Editor folder.

    I had the previous version of Spawner and deleted this before importing Spawner 2.0. Is there some other step for upgrading version that could be contributing to this error, or something else that may be causing it in the current version? 152455-unity-error.png
     
  6. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Thanks for reporting this issue. It looks like the last update broke the build by using some editor features. We will be submitting an update shortly to fix this but if you are interested to fix the problem for your self then here are the changes that need to be made:

    1: Open the C# source file located at 'Assets/Ultimate Spawner 2.0/Scripts/Spawning/SpawnNavMesh.cs' and go to line 126. You should see the following method:
    Code (CSharp):
    1.         public override void OnValidate()
    2.         {
    3.             base.OnValidate();
    4.  
    5.             if (minDistanceFromTarget > maxDistanceToTarget)
    6.                 minDistanceFromTarget = maxDistanceToTarget;
    7.  
    8.             if (maxDistanceToTarget < minDistanceFromTarget)
    9.                 maxDistanceToTarget = minDistanceFromTarget;
    10.         }
    You will need to wrap that method with Unity editor preprocessor conditions like this:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.         public override void OnValidate()
    3.         {
    4.             base.OnValidate();
    5.  
    6.             if (minDistanceFromTarget > maxDistanceToTarget)
    7.                 minDistanceFromTarget = maxDistanceToTarget;
    8.  
    9.             if (maxDistanceToTarget < minDistanceFromTarget)
    10.                 maxDistanceToTarget = minDistanceFromTarget;
    11.         }
    12. #endif
    2: In the same source file, Go to line 76 and you should see the following public field:

    Code (CSharp):
    1.         [DisplayConditionMethod("IsSpawnModeRangedOrMaximum", DisplayType.Hidden, typeof(TagCollectionDrawer))]
    2.         public string spawnerTargetTag = null;
    You will need to wrap the attribute with the same condition like so:

    Code (CSharp):
    1. #if UNITY_EDITOR
    2.         [DisplayConditionMethod("IsSpawnModeRangedOrMaximum", DisplayType.Hidden, typeof(TagCollectionDrawer))]
    3. #endif
    4.         public string spawnerTargetTag = null;
    That should allow you to now build the game. Let me know if there are any more issues.
     
  7. JuliusIbidus

    JuliusIbidus

    Joined:
    Jun 3, 2018
    Posts:
    49
    Hi, I made those script changes, created a spawning group in scene, built it and the error is gone, works great! Many, many thanks for the help.
     
    scottyboy805 likes this.
  8. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.3 has been submitted to the asset store. This version fixes an issue introduced in the previous update that would prevent from building a standalone game.
     
  9. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hello, I am using Unity 2019.3.15f + UltimateSpawner2.2 and I have a few questions.

    1. "Apply Random Rotation" of "Spawn Nav Mesh" component does not work, I set it to "No Rotation", but the object will randomly rotate xyz after spawning.

    2. "Nav Mesh Mode" of "Spawn Nav Mesh" component does not work, I set it to "Nearest Target With Tag Maximum" and add Tag objects and "Spawner Target" components to the scene, but the objects will randomly spawn in the whole scene instead of close to the Tag The place.

    3. In the "SpawnGroupDemo" scene, there are a total of 4 "Spawn Point", each point should only spawn 1 object, but I use the "Spawn Item" button under "Spawn Group" can spawn more than 4 objects, Some points will spawn 2 objects. Is this correct?
     
    Last edited: Jul 10, 2020
  10. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Thanks for your questions.
    1. Thanks for reporting. It looks like a bug because the apply rotation mode was not being used by the spawn provider. We have now fixed this and will submit an update shortly.
    2. There are a couple of things that could cause this. Do you tagged objects have a 'SpawnerTarget' component attached to them? If not, the spawner will fall back to random spawning because the spawner target is used to identify target objects in the scene. Have you set the 'Max Distance To Target' value to something smaller? This is essentially a radius value used to spawn items within range of the selected nearest target and is set to a quite high value of '16' by default. If you reduce this amount, you should find that items appear closer to targets.
    3. This is actually correct behaviour because one of the spawn items 'StaticSphere' does not have any physics colliders so it is not detected by the spawners occupied checks. If you set the spawn mask of the spawner group component to only allow 'RollingSphere' items, you will find that only 4 items can be spawned because they are physical objects which occupy the spawner.
    Let me know if there is anything else.
     
    AngelBeatsZzz likes this.
  11. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Thanks for the reply.

    2. I think my settings should be correct, but this problem still exists. I took two screenshots, you can see the settings, and the cube was spawned in the whole scene.

    3. I understand now, but my objects don’t need Rigidbody. If I add Rigidbody, it will affect the performance of the game. Is there any other method that does not need physical detection?

    20200711012841.png

    20200711012830.png
     
    Last edited: Jul 10, 2020
  12. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi again,

    2. I don't see any attached screenshots?
    3. A rigid body is not required but a physics collider is. This could just be a simple sphere or cube collider but this is the only way that the occupied checks will work.
     
    AngelBeatsZzz likes this.
  13. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi, there should be screenshots now.
     
  14. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi again,
    Thanks for the screenshots.
    Everything looks like it is setup correctly. Are you spawning the items at edit time using the 'Spawn item' button? If so, the spawner target will not be detected as it is only registered when the game starts.
    We have created a small test scene for this and can see that spawning works correctly when the game is running, but falls back to random spawning at edit time because the spawner targets are not registered. Does this sound about right to you? We could fix this by scanning the scene for spawner targets in edit mode so that the behaviour is consistent.
    If you are still having problems and then would you be able to send us a repro scene to info(at)trivialinteractive.co.uk and we can look into it further.
     
    AngelBeatsZzz likes this.
  15. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.4 has been submitted to the asset store. This version includes:
    • Fixed a bug where the apply rotation mode was not taken into account when spawning items.
    • Fixed an issue where spawner targets would not be detected during edit time causing inconsistencies between game and editor spawning.
     
    AngelBeatsZzz likes this.
  16. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Yes, I use the'Spawn item' button to spawn objects in edit mode, and now I understand. You solved all my problems, thank you.
     
    scottyboy805 likes this.
  17. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner - Waves Add-On 2.0.3 has been submitted to the asset store for review. This version fixes a submission error with the previous version where some source files did not contain the latest bug fixes and changes.
     
    dsilverthorn likes this.
  18. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi, I'm trying to implement Pooling function, but I can't find "UltimateSpawner.OnUltimateSpawnerInstantiate", it seems it doesn't exist.
     
  19. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    You may need to use the following since it sounds like you are accessing the namespace rather than the type:

    Code (CSharp):
    1. UltimateSpawner.UltimateSpawner.OnUltimateSpawnerInstantiate
    Let me know if that doesnt fix it.
     
    AngelBeatsZzz likes this.
  20. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Thank you, it works.
     
    scottyboy805 likes this.
  21. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.5 and Ultimate Spawner Waves Add-On 2.0.4 have been submitted to the asset store for review and should be available for download in a day or two. The update includes:
    • Fixed a bug i the spawning system where an InvalidOperationExcepotion could be thrown in some cases when adding a spawned item to a spawn pool.
    • Added an extra demo scene to the waves add-on asset based on the arena demo from the main asset. The demo shows how to setup a simple wave spawning system with boss enemies and also how to create a simple hud script to display infomration like wave number.
     
    dsilverthorn likes this.
  22. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner Waves Add-On 2.0.5 has been submitted to the asset store. This version includes:
    • Added a property to the Wave node 'WaveCounterMode' which determines when the wave counter will be updated. Normally this is done when a new wave node starts but some users requested that the counter be updated immediatley when the wave finishes. This can now be achieved by setting the mode to 'OnWaveEnd'.
    • Fixed a bug in the wave controller where calling 'ResetState' would not reset all controller information.
     
  23. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.6 and Waves Add-On 2.0.6 have been submitted to the asset store. This version includes:
    • Fixed a bug in the NavMesh spawner where the 'Area Mask' value was not used correctly.
    • Added a new property to the NavMesh spawner 'Allow Trigger Occupied Checks' which allows trigger colliders to affect spawning. This is useful if you intend to spawn items such as pickups without overlapping each other but can also cause scene triggers to interfere. For this reason, the option is disabled by default.
    • Added a new property to the NavMesh spawner 'Nav Mesh Edge Factor' which can be used to control how close to the edge of a navmesh items can spawn. Lower values will cause items be spawned closer to the center. This is useful particuarly for square levels where the default value may cause items to be grouped near the edge.
    • Changed the wave graph create menu from 'Create/' to 'Waves/' for better organisation with other assets that use xNode as a foundation.
     
    Last edited: Sep 2, 2020
  24. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I am using Ultimate Spawner 2.2.6 and Ultimate Wave Spawner 2.0.6, I still don't see this TotalWaveCount property.
    I am hoping that it returns the total number of waves the user must fight through, not the number of nodes in the graph.
    How would I use it in code to update a TextMeshProUGUI value in Start()?
    If this is not possible, how can I show the player the total number of waves that will change from level to level?
    IE: Current Wave: 4 of 12 Total.
     
  25. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi again,
    It looks like I gave you the wrong name. The actual property is 'TotalWavesCount' (with an 'S') and belongs to the 'WaveSpawnController' type. It returns the total number of waves in the graph.
    The reason there is no actual total value is because it can change if you are using loop or condition nodes and cause a different amound of waves to run in differen sessions. We could add a property which simulates a wave graph to the end to calcualte the number of actual waves but the value could be wrong in some cases if condition or loop nodes are used. I hope this makes sense.
     
  26. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.7 has been submitted to the asset store.
    This version includes breaking changes!
    • Renamed the UltimateSpawner type to UltimateSpawning to avoid namespace clashes.
    • Items disabled as part of a pooling system will now inform the spawning system automatically that they have despawned when using 'UltimateSpawning.Despawn'. This allows spawn controllers to know the true number of alive items in the scene and use that information in their spawn conditions.
    • Added new despawner feature 'DespawnOnTriggerExit'. This feature has been added to the existing OnTriggerDespawn component and you will now select the trigger mode required such as 'TriggerEnter' or 'TriggerExit'.
    Any scripts that used the old 'UltimateSpawner' type for pooling integration or despawning will now need to use the 'UltimateSpawning' type which contains the same members.
     
    digiross, Mad_Mark and dsilverthorn like this.
  27. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    @scottyboy805 Just upgraded, errors now appear in my project. I deleted the US2 and Wave Add-ons before upgrading and changed the UlimateSpawner.Despawn to UltimateSpawning.Despawn in my code. Errors do not seem to be related. I am using Unity 2020.1.6f1, US2.2.7 and wave 2.0.7.

    The errors start with:
    NullReferenceException: Object reference not set to an instance of an object
    UltimateSpawner.DebugUtil.WaveSpawnControllerGUIStatsLegacy.DisplayWaveControllerStats () (at Assets/UltimateSpawner2.0-WavesAddOn/Scripts/Debug/WaveSpawnControllerGUIStatsLegacy.cs:43)
    UltimateSpawner.DebugUtil.WaveSpawnControllerGUIStatsLegacy.OnGUI () (at Assets/UltimateSpawner2.0-WavesAddOn/Scripts/Debug/WaveSpawnControllerGUIStatsLegacy.cs:28)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)​

    I see the debug statement:
    Controller Log: Next Wave
    UnityEngine.Debug:Log(Object)​

    Then the next 832 errors all relate back to NullRef's in DisplayWaveControllerStats again.
    The next wave never starts.


    When I try the Arena Demo, I get an unusual first error, followed by a warning:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.GameObjectInspector.ClearPreviewCache () (at <67055f1be3654e2a987254d5437ee5b8>:0)
    UnityEditor.GameObjectInspector.ReloadPreviewInstances () (at <67055f1be3654e2a987254d5437ee5b8>:0)
    UnityEditor.GameObjectInspector.OnForceReloadInspector () (at <67055f1be3654e2a987254d5437ee5b8>:0)
    UnityEditor.AssetDatabase:SaveAssets()
    XNodeEditor.NodeEditorWindow:OnFocus() (at Assets/UltimateSpawner2.0-WavesAddOn/External/xNode/Scripts/Editor/NodeEditorWindow.cs:23)
    UnityEditor.DockArea:OnEnable()​

    Warning:
    NavMesh spawning may fail because the bounds of the NavMesh could not be sampled! (Line 317 of Spawnnavmesh.cs)
    I marked the Arena game Object static and rebuilt the navmesh, warning still appears.

    Next error is Null Ref in SimpleWaveHUD, line 45 if(waveController.CurrentWave > 1)
    Followed by a few more hundred GuiStatsLegacy errors.

    Any idea what's going on?
    Mark
     
  28. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi Mark,
    It looks like quite a few things are not working as expected. It is strange that this occurs after the update because many of the warnings and errors reported we have not touched. We are out of office for today so I will have to look into this further first thing in the morning.
     
  29. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I have been tweaking the code all day and I think I have gotten rid of all but one error. The first one that pops up.
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.Graphs.Edge.WakeUp () (at <a1ba6e352ff94393b921ff1ab74c7761>:0)
    UnityEditor.Graphs.Graph.DoWakeUpEdges (System.Collections.Generic.List`1[T] inEdges, System.Collections.Generic.List`1[T] ok, System.Collections.Generic.List`1[T] error, System.Boolean inEdgesUsedToBeValid) (at <a1ba6e352ff94393b921ff1ab74c7761>:0)
    UnityEditor.Graphs.Graph.WakeUpEdges (System.Boolean clearSlotEdges) (at <a1ba6e352ff94393b921ff1ab74c7761>:0)
    UnityEditor.Graphs.Graph.WakeUp (System.Boolean force) (at <a1ba6e352ff94393b921ff1ab74c7761>:0)
    UnityEditor.Graphs.Graph.WakeUp () (at <a1ba6e352ff94393b921ff1ab74c7761>:0)
    UnityEditor.Graphs.Graph.OnEnable () (at <a1ba6e352ff94393b921ff1ab74c7761>:0)​

    Don't ask me what I did, as it was a random troubleshooting exercise. I am not even certain if this is a Unity bug with the graphs function, or waves / spawner related.

    Cheers!
    Mark
     
  30. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi again,
    Glad to hear that most of the issues are sorted. Did you make changes to the source code to fix these errors or did the errors go away on their own after playing around with the editor for a while? I only ask because we would like to fix the errors if they are caused by Ultimate Spawner 2.0 bugs.

    As for the remaining error: We have tried many things to get the same error to show up relating to the waves editor window, animator window and more, but have not been successful. Do you have any hints or tips that may help us to reproduce the error? We also did some research for the error message and it looks like the error goes away after restarting the editor for many users. Is this the case? We found a non-reproducable bug report for the issue here but the comment section has some useful information.
     
  31. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    @scottyboy805 It appears to go away on restart. Stays away for a while, then re-appears. Annoying, and somewhat random. I have no means to reproduce. I will be redoing this project from scratch again (using new tools and add-ons) and if it comes up (or not) between restarting and the point I am at, I will track it better.

    Thanks,
    Mark
     
  32. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ok Thanks for the update.
    It may or may not be related to Ultimate Spawner 2.0 although we have not experienced the same error. If you are ever able to reproduce it consistently then we will be happy to take a look at what the cause might be.
     
  33. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner Waves Add-On 2.0.8 has been submitted to the asset store. This version includes:
    • Fixed a bug in the wave spawn controller where the current wave instance could become invalid.
    • Fixed a bug in the wave spawn controller legacy stats UI where NullReference exceptions could be thrown.
     
  34. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner Waves Add-On 2.0.9 has been submitted to the asset store. This update includes a new feature where you can now create parameters in the graph editor for conditional nodes. You can then set those parameters at runtime via the WaveSpawnController in a similar way to animator parameters. It allows you to create wave systems with much more control:

    waveparameters.png
    waveparametercondition.png

    Parameters can be set via the WaveSpawnController that is running the wave graph:

    Code (CSharp):
    1. public class Example : MonoBehaviour
    2. {
    3.     public WaveSpawnController waveController;
    4.  
    5.     void Start()
    6.     {
    7.         waveController.Parameters.SetBool("NextWave", true);
    8.     }
    9. }
     
  35. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.8 has been submitted to the asset store for review. This version includes:
    • Fixed a bug in the spawn area where enabling the above ground option would cause incorrect occupied checks using the physics overlap method.
    • Fixed a bug in the spawn area where physics overlap checks would test an area twice the desired size.
    • Added a new option 'Allow Trigger Occupied Checks' to the spawn point and spawn area spawners. This option allows other trigger objects to count as a physical object that can occupy a spawner.
    • Added method 'DespawnAllItems' to the spawn controller to easy despawn all alive items that were created by a particualar spawn controller.
     
  36. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Strange. I have tried both the Area and Point Spawners and get the same behavior. I get 2 objects spawning at each iteration. When I kill the first one, nothing happens, when I kill the second one, the kill counter iterates. Any ideas why?
    upload_2020-11-10_8-4-2.png

    upload_2020-11-10_8-11-28.png

    upload_2020-11-10_8-10-58.png
     
  37. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    That is strange indeed.
    The only thing I can think of which might cause this sort of behaviour is if you have 2 WaveController components in your scene running the same wave graph. Is that a possibility?
    I don't know what else could be causing such a problem but if you are able to send me the project, I will be happy to take a look. Send the project via email if you are willing/able to - info(at)trivialinteractive.co.uk
     
  38. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner Waves Add-On 2.1.0 has been submitted to the asset store. This version bug in the WaveCondition node where the operand value would revert to a default value causing incorrect condition evaluation and unexpected results.
     
  39. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    No, just one controller and one spawner.

    Ack, it's a huge project. Several gig. I will setup a test project with less else in it.
     
  40. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Unable to replicate. The demo works as expected. It must be something with my EmeraldAI prefab.
     
  41. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Thanks for the update.
    Perhaps you could try adding a Debug.Log to the spawn point to make sure that Ultimate Spawner is not causing the problem. You can add a message like 'Debug.Log("Spawn");' to the source file located at 'Assets/Ultimate Spawner 2.0/Scripts/Spawning/SpawnPoint.cs' at line '294', inside the method 'Spawn(SpawnableItemRef)'. You should then get a message in the console every time a spawn request is issued and there should only be one at a time. If you get 2 mesages logged at the same time then it sounds like an issue with our asset.

    Hopefully that will clarify the source of the issue.
     
  42. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I installed the US & UWS packages all by themselves in a fresh project for testing, and since I couldn't replicate (it worked as expected) I copied the 2 directories into my project overwriting the installed version. Now it spawns only one item.

    Mark
     
  43. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Glad to hear the problem is fixed although it is strange that copying the package contents fixed the issue. Perhaps something did not update correctly and overwriting the contents reset some things.
     
  44. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    @scottyboy805 and others, is there any way to identify the maximum number of waves in the current level?
    Yes, if you are doing something fancy with randomizers, or many layered waves, this might pose a problem. None the less, this simple issue needs a solution.

    Given the simple graph below, how can I display the maximum number of waves in a TextMeshProUGUI field? I'm thinking the WaveLoop node's LoopCount field, but how do I get access to it in code?

    upload_2020-11-14_11-11-49.png

    Also, what is that Parameters box? Would it be useful in meeting my challenge?

    Thanks,
    Mark
     
    Last edited: Nov 14, 2020
  45. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi again,
    We will add a way to do this in the next update as it is not so trivial to implement. We will need to simulate the wave graph instantly in order to calcualte the true total wave count value based on conditions and loops.

    The parameters box is allows you to create primitive variables that you can use in condition nodes for spawning logic. You can then set these parameter values at runtime in much the same way you would with the Unity Animator component. The parameter system will offer no help in solving the total wave count situation.
     
  46. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Any chance theres a way to spawn loot on a monsters death with this package?
     
  47. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Yes this is possible. Spawners can be attached as child objects to enemies so that they move with the enemy object, and you can just call the 'Spawn' method when your enemy is killed as many times as required. We have a few other customers using the SpawnBounds spawner for this exact use case and it seems to work well for them.
     
  48. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    69
    Hello, I found a small bug, when you use 2D mode this happens.
    I create a "Spawn Area" in 2D mode I start the Editor then click the Component Spawn Are Button "Spawn Item"
    Apparently, the spawn counter is not working you can put a Max Available location to 1 but the spawner will just ignore the counter so there's no limit.
     
  49. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Hi,
    Thanks for reporting this issue.
    We have looked into it and did find a small issue with the 2D spawn area when using 'Physics Trigger' occupied checks. Does that sound correct to you? We could find no problems with the default occupied check mode of 'Physics Overlap'. The only thing I would add is that it is not possible for 3D colliders to contribute to a spawn area's occupied checks when it is setup in 2D mode. You will need to attach a suitable 2D collider if you haven't already.

    We will submit an update shortly to fix the 'Physics Trigger' issue.
    Let me know if there is anything else.
     
  50. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Ultimate Spawner 2.2.9 has been submitted to the asset store for review. This version includes some minor bug fixes.