Search Unity

FX Bounds Indicator

Discussion in 'Made With Unity' started by ForceX, Dec 13, 2012.

  1. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102


    For Unity 3.5 Unity 4 Download the version that's right for you
    This unity package will allow you to draw an objects bounding corners display some basic information related to the object.

    WEB DEMO 1

    WEB DEMO 2

    This has been compiled for Unity 4

    PSA : Importing prefabs created in Unity 4 can / or have in the past broken Unity 3.5 projects.
    While this package does not contain any prefabs, It has not been tested in Unity 3.5.
    If you have problems after importing a Unity 4 package into prior versions of Unity simply navigate to your projects folder and delete the imported asset that is causing the problem.


    Change Log

    1.0.0 : Release
    1.0.1 : Added Set Limits
    1.1.0 : Added Pixel perfect rendering.
    1.1.1 : Fixed pixel crawling
    1.1.2 : Fixed dynamic batching
    1.1.3 : Added inspector Enable / Disable toggle
    1.1.4 : Added basic information display (Follow the object)
    1.1.5a : Added more information display modes (Fixed on screen)
    1.1.6 : Fixed Display indicator line not turning off when setting display indicator to disabled. Fixed info display not turning off when behind player.
    1.1.7 : Procedurally generates it's own meshes and no longer requires an external .FBX for Resource.Load

    TIPS
    1. If you change the screen resolution during runtime then call FX_Bounds_Indicator.SetScale(); to adjust the bounds indicators to the new screen size.

    2. The display style of the information display can be changed by editing the GUISkin located:
    ForceX Bounds Indicator\Resources\Display_Skin ---> edit Label settings.



    Internet Explorer 9 users. If you are having problems downloading files from the fourm please enable Compatibility View
     

    Attached Files:

    Last edited: Jan 29, 2013
  2. Schlumpfsack

    Schlumpfsack

    Joined:
    May 30, 2010
    Posts:
    608
    *scratches head*
    not able to download the package.... :(
     
  3. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Schlumpfsack : I think the unity servers are having problems ATM i cant seam to download anything from the forums right now. Well the downloads will start but only go 8kbs, and then time out. Give it some time and see if things resolve them selves.
     
  4. Schlumpfsack

    Schlumpfsack

    Joined:
    May 30, 2010
    Posts:
    608
    yup...seems so....and thanks for this package btw :)
     
  5. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    @ ForceX: Nice! I need to put some time aside for upgrading the radar and having a poke at the Bounds Indicator. Fingers crossed it will be soon ;)
     
  6. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    New version coming soon.

    This update will allow you to set a min max size the bounds are allowed to be drawn on the screen. This means when an object gets really close to the camera that its bounding indicators will no longer fill the entire screen and look funny, but instead be limited to a max draw size set by you.

    Look for this update this weekend.
     
  7. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.0.1

    New Features:
    1. Set Limits - This will allow you to set a min and max screen size that the bounds corners are allowed to be drawn on the screen.

    Tip : Because of the way the Bounds Indicators work, the system has a inherent min size that can be drawn. Set Limits will allow you to make this min size larger.

    Notice : You will want to take into consideration the aspect ratio of your screen when setting Min Max sizes. A future update will handle this automatically.

    Min Max WebDemo
     
    Last edited: Dec 16, 2012
  8. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX, great package!

    Edit: the download of the last package is broken!
    Edit2: now works!
     
    Last edited: Dec 16, 2012
  9. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @sjm tech : Good to see you again :)

    I just tested the download. It seams to work fine on my end. Even imported into unity ok. Give it another try and let me know.
     
  10. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks .. me too .... i follow always with big interest your production... all are great jobs.

    Now the download works well...
     
  11. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.1.0

    New Features:
    1. Pixel perfect rendering.

    Updated Web Demos.

    Tip : If you change the screen resolution during runtime then call FX_Bounds_Indicator.SetScale(); to adjust the bounds indicators to the new screen size.
     
    Last edited: Dec 30, 2012
  12. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.1.1

    Fixes:
    1. Pixel perfect was not rendering perfect all the time. This has been updated. You should no longer see pixel crawl.
     
    Last edited: Dec 30, 2012
  13. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.1.2

    New Features:
    1. Reset Size. This is a inspector debug feature that will allow you to re adjust the bounds size to the screen if you are switching to and from a maximized game window.

    Fixes:
    1. Restored dynamic batching. For some reason one of the corners was not batching. This was creating +1 draw call for every object using the bounds indicator. This has been fixed. You should now be able to use the script on as many objects as you like and only have 1 draw call for the entire scene.
     
  14. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX this indicator system is awesome....is there a easy method to active/disactive the indicator on runtime?
    I notice that if an target object becomes enabled the indicator is displayed...but if the target object returns disabled the indicator still remains visible.
     
  15. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @sjm tech : Done :)

    Update 1.1.3

    New Feature:
    1. Enabled toggle. You can enable or disable the bounds manually from the inspector by toggling the Enabled button or by calling FX_Bounds_Indicator.Enabled = true / false.
     
  16. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    :eek: super fast..thanks!
     
    Last edited: Dec 30, 2012
  17. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    some nice features that could be added:
    - proximity range for targets detection ( and bounds indicator enabling)
    - a sounf fx when a new target become in range of detection
    - an optional indicator text( with some target infos...name...distance etc.)

    edit: could be interesting develop a dinamic text visualization that switches dynamically between the images below ... relatively to the indicator size (target distance).
     

    Attached Files:

    Last edited: Dec 31, 2012
  18. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @sjm tech : That would be pretty cool. I'll work on it for the next update.
     
  19. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    I'm imagine something like this!
     

    Attached Files:

  20. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    1.1.4 1.1.5a Combined Update

    ----1.1.4 ----
    New Features:
    1. Added option for basic object information display. This method uses a GUI label which can be edited to display any other information required. This version the Display Info is basically attached to the object and will follow it around the screen. If the Display Info goes off screen before the object does then it will snap to the opposite side of the object.

    Tip
    1. The display style of the information display can be changed by editing the GUISkin located:
    ForceX Bounds Indicator\Resources\Display_Skin ---> edit Label settings.


    ----1.1.5----

    New Features
    1. Added new Display options for the Information Display. These a fixed positions on the screen. With an option to draw an Indicator line to the object.

    Updated Web Demo 1 to show the Information Display modes
     
  21. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Very nice! Thanks so much for sharing!
     
  22. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @I am da bawss : Your welcome! :)

    Update 1.1.6

    Fixes:
    1. Fixed the display indicator line renderer not turning off when setting display indicator to disabled.
    2. Fixed the information display from not rendering correctly when the object is behind the player while display tracking is enabled. This will now auto disable.
     
  23. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Wow, fantastic!
    one note... would be perfect have the indicator also in the tracking system (the indicator could fill the display offset distance if enabled)
     
  24. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @sjm tech : I'll get that in the next update.
     
  25. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Why Unity 4 :( Im very dissapointed
     
  26. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @TBOY298 : This .unitypackage has been created in unity 4. However since there are no prefabs it should be safe to open in a untiy 3.5 environment. This weekend i will be updating the package so that no external content is required for Resource.Load and this will insure backwards compatibility with 3.5.

    Edit:

    Uploaded Unity 3.5 compatible build. v1.1.7
     
    Last edited: Jan 26, 2013
  27. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.1.7 Unity 3.5 Unity 4

    Changes:
    1. Script will now procedurally generate it's own meshes removing the need to Resource.Load external FBX files.

    Edit:
    Uploaded Unity 3.5 compatible build.
     
    Last edited: Jan 26, 2013
  28. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Wow, thanks for all the hard work! I guess it wasnt easy...
     
  29. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Can't download the latest v1.17.... When I click "save as" it just says "clear.gif" :(
     
  30. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @I am da bawss : Can you try again and let me know. I was able to download both files onto my pc and laptop. I know (for me at least) the unity forums get very slow after 10pm central to some time in the early morning. I think they might perform server maintenance during this window. Which has (for me) affected browsing the fourm, to the point of pages not even loading. If you still have problems let me know and i can PM it directly to you.
     
  31. Eirikrautha

    Eirikrautha

    Joined:
    Jun 8, 2010
    Posts:
    13
    Yep. Same thing happening here. I get a one pixel by one pixel gif file instead of the package...
     
  32. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    OK here is what i discovered. Internet explorer only tries to download a 1 pixel gif.. Google chrome downloads the files just fine.

    If you are using IE try another browser i have no idea what is going on with that.
     
  33. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    I found the answer. If you are using IE9 and are getting the 1 pixel gif file, simply enable Compatibility View. This will fix your problem.
     
    Last edited: Jan 29, 2013
  34. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Okay, it works now :) Thanks ForceX!
     
  35. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Your welcome! :)
     
  36. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    Great work, thanks for making this available.
     
  37. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    What should be the name of the layer according to the indicators?
    I am using the Unity 4 version.

    I've found this topic via my old favorite links inside a Text-document on my harddrive. :p

    Please y'help?
     
  38. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    You don't need to have any specific name. Simply create a layer or use any existing layer and set that layer on the script in the inspector on the "HUD Layer" drop down selection menu.
     
  39. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    Okay, I'll try it. I was confused by the prefab I made when it said it's layer is set to "Unnamed 9".
     
  40. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Yah, you would get that if you assigned a prefab a layer other than one of unity's default layers aka layer 9, then imported that prefab into a new project; because layer 9 has not been assigned it will appear as Unnamed and the layer number until it has been named.