Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Uni Bullet Hell - 2D bullet hell's shot pattern system

Discussion in 'Assets and Asset Store' started by WestHill, Jun 28, 2014.

  1. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    "Uni Bullet Hell" is 2D bullet hell's shot pattern system for Unity.
    You can create various bullet patterns simply by adding script component of shot pattern.

    Check this video and support web site.

    • You can customize a various bullet param in inspector. bullet num, bullet speed, angle, accel speed, accel turn, call back, delay, random, aim target, etc...
    • Pooling system of bullet GameObject.
    • All script source file (C#) is included.
    • Sample shot patterns of 50 kinds are included.
    • Example scene of full game is included.
     
    Last edited: Oct 10, 2019
  2. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Added to purchase list till I have the money ;P
     
  3. Lifevirus

    Lifevirus

    Joined:
    Nov 29, 2014
    Posts:
    2
    I'm using this for the first time and i'm curious as to if the player uses the different prefabs can you rig them to hit the enemy? Also, Is there anyway to edit the power of each bullet and how much it'll take off of the player?

    I see the UbhSimplebullet and i'm wondering if I attach that to the bullet if that'll work if I drop the speed to zero.....

    I'm using 2dToolkit and it's not letting me add the normal scripts due to 2DTK using 3d box colliders and I'm not finding anything to edit the damage of the bullets manually via the prefabs or scripts except the player script which won't attach. I'm wondering if i'm stuck using 2d colliders or if there's a way to manually put the bullets into the game.
     
  4. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Do you want to add power parameter to the bullet?
    Well please add your own script include a power member.

    2D collider of UniBulletHell is not required.
    It works by replacement the 2D collider to 3D collider.
    (In that case, remove the "2D" from the trigger event method and collider event method.)
     
  5. Lifevirus

    Lifevirus

    Joined:
    Nov 29, 2014
    Posts:
    2
    Greetings again,

    I'm trying to use the UniBulletHell setup with the Dark Tonic CoreGameKit + Pooling and I'm having a issue with the use of two pools and the UniBulletHell not meshing well with it. (I'm not a programmer by any means)

    Is there any way to prevent UniBulletHell from creating it's own pool or using it with another pool set up so that you can use the amazing bullet prefabs you made or if I would have to edit/make my own scripts to do so? I know that the UbhObjectPool is built into the coding but any chance of possible modification?
     
  6. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi

    Sorry I do not have a "Dark Tonic CoreGameKit +".

    To replace the object pooling system, please rewrite the "GetGameObject" method and the "ReleaseGameObject" method of "UbhObjectPool.cs".
     
  7. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    First of all let me say that I absolutely love this package and my, albeit limited, experience with it has been nothing but a pleasure! If I may though, I have a request for possible future versions and one issue that I am experiencing.

    In regards to the request, it would be great if you could implement the ability to have the bullets inherit the rotation of their parent on the incase the project this package is being used in is not based on vertical movement. I have already implemented this in my own project, so it is far from critical but would be nice to see as a default option.

    The below has been resolved, please see the edit at the bottom of this post for the resolution.
    As for the issue that I am experiencing with UniBulletHell, I have a Linear Shot attached to my player and it functions as intended for a varying amount of time and then it degrades into taking longer and longer between shots - to the point where I have experienced delays of >5 seconds between shots. I've attached the settings of both the shot control and shot components, if perhaps you could point out where I might be going wrong?

    Screen Shot 2015-02-18 at 8.11.08 AM.png Screen Shot 2015-02-18 at 8.11.18 AM.png

    EDIT:

    Shortly after posting this, while I was digging through my scripts I released that my bullet controller was attempting to release the bullets child object to the pool and not the parent; thus never allowing the child to be reenabled by the pool manager.

    TL;DR:
    I messed up.
     
    Last edited: Feb 18, 2015
  8. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi

    Thank you for a request!
    I am going to add the global option of XY axis or the XZ axis by update.

    About a issue.
    When you release a bullet, please exclude a check of UseAutoRelease.
    When it becomes ON, a regenerated bullet is released five seconds later.
     
  9. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi there

    Uni Bullet Hell in today's update (ve1.1.2), now supports the 3D world.
    You can set the 3D prefabs and select the X-Y axis or the X-Z axis.

    Regards

     
  10. yoshiaki_natsume

    yoshiaki_natsume

    Joined:
    Jul 21, 2015
    Posts:
    2
    hello.
    When player move bottom to top quickly, Homing Shot Bullet always go somewhere else(mainly go bottom).
    so can I adjust homing level more flexibly?

    thank you.
     
  11. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    Thank you for the report. I found a problem.
    Until the fixed version is released, please wait few days.
     
  12. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    Uni Bullet Hell v1.1.4 was released.
    Fixed bug of homing shot.
    Please check this update.

    Unity Asset Store Link
     
  13. yoshiaki_natsume

    yoshiaki_natsume

    Joined:
    Jul 21, 2015
    Posts:
    2
    It seems good.
    thank you.
     
  14. SolarFalcon

    SolarFalcon

    Joined:
    Nov 28, 2015
    Posts:
    170
    I just bought this system and followed the guide on your website and I can't get any patterns to work. I've followed the instructions on the website perfectly as they are not really that hard. Is there a new way of doing things or am I missing something?

    EDIT:

    Ignore this. The bullets are super small for some reason.
     
  15. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    What do you want to do? What's not work?
     
  16. SolarFalcon

    SolarFalcon

    Joined:
    Nov 28, 2015
    Posts:
    170
    I got it to work. For some reason, the bullet sprites were very small and I couldn't see them. I thought they weren't rendering, that's how small they were! Thanks.
     
  17. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    OK!
     
  18. SolarFalcon

    SolarFalcon

    Joined:
    Nov 28, 2015
    Posts:
    170
    I have a request/suggestion. Homing projectiles should turn to point towards the target. As far as I can tell, they don't do this already, but this would be a nice addition.
     
  19. SolarFalcon

    SolarFalcon

    Joined:
    Nov 28, 2015
    Posts:
    170
    I believe I have found a bug. I am using the Prefab LinearShot. When the player object has an enemy object ahead of them, and they both remain in one place, the bullets don't move down the screen. They just appear at the spawn point, then vanish. If I move the player however and wait for a moment, the bullets will then travel down screen normally, as long as the player doesn't remain in line with an enemy object.
     
  20. OpenXcell-Studio

    OpenXcell-Studio

    Joined:
    Nov 19, 2012
    Posts:
    6
    Can we use this plugin for Unity's UI Elements ?
     
  21. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    It works.
    You must place a Gameobject attached with a UbhObjectPool under the UI canvas.

     
  22. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hi West,

    I'm using UBH with Core Gamekit, and I noticed that the bullets are not spawned/despawned correctly from the pool.
    The enemies' bullets doesn't recycle, and the player's keep instantiating new one. I tried unchecked "allow instantiate more" but some other exceptions are thrown. In just a few minutes the pool becomes too big and bogs the fps way down.

    I also tried building your example scene, which also gives poor fps, around 15 fps mark.

     
  23. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    Are you enable a definition "USING_CORE_GAME_KIT" in "UbhObjectPool.cs"?
    You have to do it if you use the CoreGameKit pooling system.
     
  24. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Yup, I did enable the definition. Tried it with the example scene you provided, the Pool Boss object was created but the pool keeps increasing in size.
     
  25. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    I tried it in ShotShowcase scene(example in asset), but there was no problem.
    Can you send me your project by e-mail?
     
  26. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Sure, I'll clean up my project a bit. Can you PM me your address?
     
  27. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Please send to this. nishioka-h@westhillapps.com
     
  28. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    It seems I've made a silly mistake, I used different names with the bullets as I assumed that the HitCheck() in UbhDestroyArea was checking against the tag. :oops:

    Anyways, thanks for the reply. Sorry to bother you. :)
     
  29. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    OK!
     
  30. LastSipahi

    LastSipahi

    Joined:
    Sep 14, 2011
    Posts:
    21
    Hi, after updating my 4.6.9 to 4.7 Plugin started give following error :

    Assets/UniBulletHell/Example/Script/UbhDestroyArea.cs(54,24): error CS1061: Type `UnityEngine.BoxCollider2D' does not contain a definition for `offset' and no extension method `offset' of type `UnityEngine.BoxCollider2D' could be found (are you missing a using directive or an assembly reference?)
     
  31. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    I will submit a fix version for Unity4.7.0.
    Please wait for release.
     
  32. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    UniBulletHell v1.1.6 has been released. Please check this.
     
  33. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    Hi,

    just a small question, which is actually two small questions.

    First, i have to make a ShotCoroutine in UbhShotCtrl.cs public to make it accessible from another script, can i call it in some other way to keep it private?

    Here's the code for calling it:

    Code (csharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class PlayerShot : UbhShotCtrl
    7.  
    8. {
    9.  
    10.     void Start()
    11.  
    12.     {
    13.  
    14.     }
    15.  
    16.     public void StartShotRoutine(){
    17.      
    18.     if (Input.GetButton("Fire1"))
    19.  
    20.     {
    21.         StartCoroutine(ShotCoroutine());
    22.     }
    23.  
    24.     }
    25. }
    26.  
    The other question is why won't it work? I unchecked Start On Awake in inspector, and there are no errors in the log.

    Here's the inspector

     
    Last edited: May 24, 2016
  34. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi
    you can use "UbhShotCtrl.StartShotRoutine()" method from the other script.

    ex.
    Code (csharp):
    1. public class PlayerShot : MonoBehaviour
    2. {
    3.     UbhShotCtrl m_shotCtrl;
    4.  
    5.     void Start()
    6.     {
    7.         m_shotCtrl = GetComponent<UbhShotCtrl>();
    8.     }
    9.     void Update()
    10.     {
    11.         if (Input.GetButton("Fire1"))
    12.         {
    13.             m_shotCtrl.StartShotRoutine();
    14.         }
    15.     }
    16. }
     
  35. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    NullReferenceException: Object reference not set to an instance of an object
    PlayerShot.Update () (at Assets/Scripts/PlayerShot.cs:18)
     
  36. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    You must add component a "PlayerShot" with "UbhShotCtrl" to same GameObject.
     
  37. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    They are on the same object, i get this:

    Coroutine couldn't be started because the the game object 'RandomShot' is inactive!
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    UbhRandomShot:Shot() (at Assets/UniBulletHell/Script/ShotPattern/UbhRandomShot.cs:37)
    <ShotCoroutine>c__Iterator18:MoveNext() (at Assets/UniBulletHell/Script/Controller/UbhShotCtrl.cs:122)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    UbhShotCtrl:StartShotRoutine() (at Assets/UniBulletHell/Script/Controller/UbhShotCtrl.cs:58)
    PlayerShot:Update() (at Assets/Scripts/PlayerShot.cs:18)
     
  38. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Please send the project by e-mail so I'll check it.
     
  39. SolarFalcon

    SolarFalcon

    Joined:
    Nov 28, 2015
    Posts:
    170
    Do you think you could add a "N-way Homing" Shot? The homing shot function is wonderful, but I'd really like to see an N-Way version of it. Other than that, this pack is just awesome. Having a lot of fun with it now that I have a good handle on how it works, but I don't want to mess with the code in the files.
     
  40. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    OK, I will consider adding it to the release in the future.
     
    SolarFalcon likes this.
  41. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    @WestHill

    Hello, i need a small bit of info. I'd like to play an animation and sound as the object fires a bullet. What property should i listen to? I see there's a shooting property, but i guess that's not the exact moment of spawning a bullet, but rather the whole state of firing multiple bullets.

    Does the shot finished callback events send an event as soon as the bullet is spawned?
     
  42. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    Hi

    If you add a component with OnEnable method to the bullet GameObject,
    It is called at the moment the bullet is fired.
     
  43. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    @WestHill

    wouldn't that affect all the ships using the same bullet prefab?
     
  44. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    @Kruko

    Yes, it is.
    I plan to add a callback option when shot lines are fired.
    Please wait a few days.
     
  45. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
  46. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    I saw this advertised on the front page and it may be what I'm looking for.
    A few questions.

    Are you able to fire different types of shots?
    eg. homing missiles, charge lasers, etc.

    Can you get shots that split into multiple shots at a point/s along their path?

    Can different shots be collected as powerups and turned on and off by the code?
     
  47. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    @Kruko

    ver1.2.4 has been released.
    Added shot fired call back option.
     
  48. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    174
    @Cereal_Killa
    Hi
    Homing shots are included, but lasers are not included.

    It can not be done with this asset.

    Yes, It is possible to switch shots by code.
     
  49. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    @WestHill

    That was quick, thanks for the update!

    @Cereal_Killa

    If you are using Core Gamekit (but you can do it in code too), you can set a timed despawn which triggers a death prefab which is an empty prefab with attached shot controller which does its thing in shortest possible time and then despawns too.
     
  50. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    If you shot a projectile emitter through the air with each bullet fired would it not continue emitting, giving the illusion that the large bullets were also firing small bullets?

    You could attach the projectile emitter to the bullet prefab.

    Just my thoughts on how I would do this..

    I'm happy to write the code myself if your system is easily extendable.
    You system looked like a good starting point for a spellcrafting system.