Search Unity

NJG Minimap [Released]

Discussion in 'Assets and Asset Store' started by hjupter, Apr 23, 2013.

?

Do you need DF-GUI support for this asset?

Poll closed Jun 3, 2015.
  1. Yes

    56 vote(s)
    60.9%
  2. No

    36 vote(s)
    39.1%
  1. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    I'm about to finish an update wich contains a fix for occlussion but is not ready yet, for now just do this:

    Find and open NJGMapRenderer.cs go to the Awake method on line 62 then add this "camera.useOcclusionCulling = false;" before "Render()" and that will fix your issue with occlusion :)

    The main map icons is an issue with NGUI depth since maps are rendered in quads instead of ngui UITexture this because a big change on how UITexture was update when NGUI 3 was introduced NGUI has changed a lot since then so I will see if I can use UITexture again, anyways to fix that issue all you have to do is play with depth try changing the depth on the UIWorldMap inspector.
     
  2. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Hi hjupter,

    thanks. Yes i worked out changing the depth in the UI settings on the world map to 1, i can now see other player icons etc.

    camera.useOcclusionCulling = false; didnt solve my issue im afraid :(
     
  3. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Oh thats bad :(, did you verified that your bounds are being calculated well? you should be able to see a red wireframe covering your scene also what about the render layers are they set properly too?

    Other thant that this is a weird issue, you can also add me to skype: hjupterc
     
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,496
    I am glad you are back.. but can you please give me some heads up on what is happening with my reported bug?
     
  5. barjed

    barjed

    Joined:
    May 9, 2013
    Posts:
    68
    Hi,

    I am considering buying your asset. Two questions:

    - is DF-GUI support still coming or was it dropped?
    - will this be useful for maps that are dynamically changed during gameplay - for example, when the player can place various building by himself

    Cheers
     
  6. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Castor, I'm working on update to fix/improve this along with other changes and performance optimizations, I'll let you know when I got an stable beta build for you.

    1. Yes DF-GUI its still coming I just has been short on time but its definitely coming.
    2. Yes there are few games which have dynamic terrains and stuff like that are using my minimap solution, all you have to do is call NJGMap.instance.GenerateMap() when you want to update the map.
     
  7. barjed

    barjed

    Joined:
    May 9, 2013
    Posts:
    68
    So until DFGUI support comes I guess I could use Unity GUI. Is it possible to upgrade it easily later? Does the Unity GUI have all the features of the NGUI version?

    edit: Is it possible to add an outline to the map in the Unity GUI mode?

    edit2: Somehow the tooltips don't work at all in Unity GUI version? Any way to fix this?

    edit3: Why doesn't the NJGmap.instance.UpdateBounds() work? My setup is this: player walks around a town and can enter houses. When does this, the game creates some objects far away from the town, but in the same scene, and sets the player there. I've written a script that calls both UpdateBounds() and GenerateMap() methods whenever the transition occurs. The problem is that while the map refreshes, the bounds don't. I have to pause the game, disable, enable Bounds and only then it updates. This also seems to work when I press the "generate map" button in the Inspector.
     
    Last edited: Mar 20, 2014
  8. Xomanowar

    Xomanowar

    Joined:
    Apr 2, 2014
    Posts:
    40
    Hi, your minimap system looks awesome, I wan't to know if has some integration with Playmaker, I'm not a
    Programmer, but I'm trying to make some mockups of my ideas with Playmaker. Or if is acessible to non programmers.

    Tks
     
  9. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,496
    New version???

    Where did you get that news?

    And what about the issues that I was having.. are they fixed or not..

    This has been tooo long now.
     
  10. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    It does not work with Playmaker but you can use it without programming anything.

    Castor I'm still working on a new version, it still not ready yet but it will be soon, sorry for the long delay.
     
  11. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,320
    Is the fog of war just on the minimap itself? Or does it provide fog of war for the game (I mean in the "world" itself) -- above the terrain/characters and such?
     
  12. GameNative

    GameNative

    Joined:
    Apr 17, 2014
    Posts:
    40
    Hi,

    Just purchased the mini-map and i'm having a small issue.

    The "blue" fog in my scene is showing on the mini map, how can I make it not show the fog of the scene?
     
  13. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    The fog of war its only for the minimap.

    Try changing the shader type on the minimap and world map inspector
     
  14. GameNative

    GameNative

    Joined:
    Apr 17, 2014
    Posts:
    40
    You talking about (texture mask, color mask, FOW) ?
    I tried all 3 no luck.


    If I remove fog from the Scene Rendering Settings, it works... but I need fog in my scene.


    The problem seems to come in when I use the relief terrain.
    https://www.assetstore.unity3d.com/#/content/5664
     
    Last edited: Apr 21, 2014
  15. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Will need to take a look closer to this, do you have skype? here is mine: hjupterc
     
  16. GameNative

    GameNative

    Joined:
    Apr 17, 2014
    Posts:
    40
    Got it working!

    If using the Relief Terrain, under _RTP_LODmanager->LOD level change it to "CLASSIC".
     
  17. Darkling420

    Darkling420

    Joined:
    Apr 20, 2013
    Posts:
    27
    It seems to be broken with U4.3.4
    The custom inspector window needs a rewrite, as the window has to be in one exact position to adjust the variables. One variable can't be adjusted at all; the range from:to. The world map panning no longer works and the icons on the world map aren't even inside the map, but outside by several hundred units.
     
    Last edited: Apr 24, 2014
  18. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    250
    But does this not ruin your terrain quality? I mean if you use classic in stead of POM, then you loose a lot of the quality RTP has to offer? Or am i wrong?

    Best Regards
    Peter
     
  19. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! Is there a way to temporarly hide all icons of certain type from the map?
     
  20. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Sorry for the late answer but I did not get an email about your post, yes since Unity 4.3 things changed a for inspectors I'm fixing that and improving the inspectors for the new version for now try setting the inspector for debuging so you can change any value if you get stuck.

    There is not a built-in way for that but you can create a small script that checks map item type and hide it whenever you want, on the next version I will be adding something like this:


    Also you will be able to hide/show it at runtime with code like this NJGMap.HideIcon(type); NJGMap.ShowIcon(type);
     
  21. elizeusz

    elizeusz

    Joined:
    May 2, 2012
    Posts:
    49
    Any news about new version ?
     
  22. TylerO

    TylerO

    Joined:
    Aug 21, 2011
    Posts:
    35
    I too am interested on the next release... Will support for WP8 and W8 be added? I have been having some problems with porting my game due to threads not being supported on those platforms. I will surely be able to rummage up a patch for now but hopefully official support will be coming in the next release!
     
  23. lzt120

    lzt120

    Joined:
    Apr 13, 2010
    Posts:
    93
    I wonder if the GUI Version is support circle mark minimap ?
     
  24. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    220
    How do you reset the current minimap so it can be used for new map/scene? I have been modifying the scripts but it seems I'm only getting more errors :/
     
  25. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Should be ready soon by next month
    I have never tried before but Ill be on that soon anyways if you have a patch for send it over that would be helpful :)

    Do you mean masks? If so yes it does support any type mask you want
    Do you want to renegerate the texture at runtime? Call this method whenever you want NJGMap.instance.GenerateMap()
     
    Last edited: May 27, 2014
  26. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    419
    NGUI 3.6 broke this again. The new 2D collider options.

    Add:
    mi.collider = go.GetComponent<BoxCollider>();

    in line 161ish UIWorldMap.cs and line 212ish UIMiniMap.cs

    I presume using 2D colliders will break this completely. Should probably have it check the camera to see which one you want to use.

    Also, my issue I've had to fix myself (XY overhead settings), which was quite annoying. Oh well, mostly works now.
     
    Last edited: May 28, 2014
  27. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Yeah I will have to publish a hot fix for it. What issues you fixed with XY? Send me a PM
     
  28. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    419
    Uhh, edited post above.

    Sorry, no PM because we sent like 38 emails back and forth on this issue in January and I finally gave up and spent a lot of time trying to decipher how things worked to resolve it myself. I understand it was a lot of work since you didn't have a native XY overhead, just XY side-scroller. However, with 2D physics only being on the XY plane, if you do an overhead 2.5D type game with 2D physics, this is gonna happen.

    I spent quite a few days dedicated to figuring it out. I hope whatever updates come out I can patch into my version, and if not... oh well, at least my map mostly works now.
     
  29. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    I already fixed the colliders issue with NGUI 3.6.1 but might need to test and change few things.

    Oh I see, so sorry for the trouble.. would be awesome if you could send me your patch so I can see it and apply it to the update. Can you do this?
     
  30. lzt120

    lzt120

    Joined:
    Apr 13, 2010
    Posts:
    93
    As you can see, when using the marks,the icon is out of marks for this mesh version !!
     

    Attached Files:

  31. jacket76

    jacket76

    Joined:
    Mar 21, 2014
    Posts:
    3
    upload_2014-6-8_18-20-35.png
    hello,how can i use this tool to make a car minimap like this?Dose this use the second camera too?
     
  32. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    There is no need for a second camera, I setup the NJGMap to render only the road then I edited the road on photoshop and assigned that image to NJGMap settings instead of using automatic rendering.
     
  33. Parallaxe

    Parallaxe

    Joined:
    Apr 9, 2013
    Posts:
    118
    Is there a ETA for DF-GUI support? As far as I can see NJG MiniMap has not been updated since January?
     
  34. species5618

    species5618

    Joined:
    Jul 24, 2013
    Posts:
    7
    HI there,
    i just bought your assets from the asset store to use it in a game i'm developing:

    can you confirm for me that:

    1) you need to download the assets of unity assets store and import it.
    2) then you also need to import either NGUI or the Mesh version asset thats inside the file

    Is that correct?
     
    Last edited: Jun 17, 2014
  35. species5618

    species5618

    Joined:
    Jul 24, 2013
    Posts:
    7
    HI,

    Is seems im getting some small error causing it to partially work.
    One of the thing i needed todo was define the icon folder again in the Icon tabs as it did not had it:

    Snap11.jpg

    anyway im getting these errors:

    NullReferenceException: Object reference not set to an instance of an object
    NJG.NJGMapBase.SetTexture (UnityEngine.Texture2D tex) (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/NJGMapBase.cs:655)
    NJG.NJGMapInspectorBase.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Editor/NJGMapInspectorBase.cs:239)
    NJGMapOnGUIInspector.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/Editor/NJGMapOnGUIInspector.cs:24)
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
    UnityEditor.DockArea:OnGUI()

    NullReferenceException: Object reference not set to an instance of an object
    NJG.NJGMapBase.SetTexture (UnityEngine.Texture2D tex) (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/NJGMapBase.cs:655)
    NJG.NJGMapInspectorBase.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Editor/NJGMapInspectorBase.cs:239)
    NJGMapOnGUIInspector.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/Editor/NJGMapOnGUIInspector.cs:24)
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
    UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)

    NullReferenceException: Object reference not set to an instance of an object
    NJG.NJGMapBase.SetTexture (UnityEngine.Texture2D tex) (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/NJGMapBase.cs:655)
    NJG.NJGMapInspectorBase.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Editor/NJGMapInspectorBase.cs:239)
    NJGMapOnGUIInspector.OnInspectorGUI () (at Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/Editor/NJGMapOnGUIInspector.cs:24)
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
    UnityEditor.HostView:OnGUI()

    i was testing it on the Fog of War level but other levels give a comparable error.

    this is how the level try to run:


    Snap12.jpg

    That does not seems right? :)

    anyway can you please assist me solving the error so i can use it my a exiting game.

    regards
     
  36. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    DF-GUI and UGUI its planned but since I wont be able to include .unitypackage inside the asset I will have to split them all into different versions.

    Yes thats all you have to do but that will change soon since I will have to split versions into different assets.

    I'm currently working on an update for today/tonight, ping me up with your invoice # to my email hjupter@ninjutsugames.com and I will send you the updated/fixed version as soon as Im done
     
  37. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
  38. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    A new update has been submitted to the asset store here are the changes:

    1.5.4
    - NEW: Map Zones can now generate the texture map on trigger. Added toggle to the MapZone component.
    - NEW: NGUI 3.6.4 support.
    - NEW: Updated Demo scenes.
    - NEW: Optimized shaders for mobiles.
    - NEW: Performance optimizations.
    - NEW: Switched to LeanTween for better performance and more platforms supported.
    - NEW: Simplified the prefab. All you have to do now is drop it inside your UIRoot.
    - DEL: Removed "Layer" option from NJGMap inspector since its no longer needed.
    - FIX: Fixed some issues with inspectors.
    - FIX: Fixed a bunch of issues with the prefabs.
    - FIX: Render camera will work fine on unity 4.3 with occlusion culling.
    - FIX: FOW shaders will change properly when FOW its turned on.

    Anyone needing this ASAP send me an email with your invoice # to my email: hjupter@gmail.com

    Thanks
     
  39. species5618

    species5618

    Joined:
    Jul 24, 2013
    Posts:
    7

    Thanks for the fast reply, i send you my invoice :)
     
  40. species5618

    species5618

    Joined:
    Jul 24, 2013
    Posts:
    7
    HI there,

    your update fixed a lot, but either i'm doing some step wrong or something is still a miss.

    Anyway basic function work, map kinda shows, icon in minimap work great and tagging to.

    I made a very small test scene inside my game project to show you what does not seems to work (or i misunderstand the setup):

    1) Zones, i get no zone indication on my map as you can see in my example (picture)
    2) No minimap frame
    3) No bigmap
    4) No zoom or coordination icons around minimap
    5) No background image on minimap (might got something to do with current camera setup)

    please see picture.

    Now i did not have any error, only when trying to use the demos, i do have verral null pointer errors.

    I'm running unity 4.3. Im using the Mesh version (1.5.4) and i have installed your update from scratch.

    Hope you can help me out here,

    regards,

    species5618
     

    Attached Files:

  41. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Hi, the mesh version its a bit limited UI wise since it depends pretty much on OnGUI code as far as I know there is like around 5 people or less using this version, I will take a look at this but to be honest it will be discontinued soon since UGUI is coming soon.
     
  42. species5618

    species5618

    Joined:
    Jul 24, 2013
    Posts:
    7

    Well any help would be really great, else i would need to upgrade to NGUI 3.x and that would drive up the development cost :).
    Hope you can find the issues and thanks for having a look at it,

    regards,

    species5618
     
  43. brianbraatz

    brianbraatz

    Joined:
    Apr 21, 2013
    Posts:
    17
    I purchased this asset- havent had the time to dig in yet- but I figured I would start with a question:

    I need to do a realistic radar- where if you do not have line of sight- then you cannot see it on the radar

    I would like some advice from the author: do you think it would be better for me to adapt your package- or completely make my own from scratch (I am hoping I can adapt yours :) )

    ???

    thanks!

    Brian
     
  44. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    156
    I just bought this asset, imported it to Unity 4.5 and I keep getting script compile errors:

    Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/Core/NJGMapOnGUI.cs(12,28): error CS0246: The type or namespace name `NJG' could not be found. Are you missing a using directive or an assembly reference?

    Most of the scripts have the same error:

    `NJG' could not be found.
     
  45. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    A new version was submitted few days ago should be on the store this weekend I guess, if you are in a hurry just send me an email with your invoice number to: hjupter@gmail.com

    Like this?


    This is a feature I've wanted to add, actually I started messing around with this weeks ago, I will see what I can do for the next version.
     
  46. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    156
    No problem I can wait, thanks for the quick update.
     
  47. jf3000

    jf3000

    Joined:
    Dec 31, 2013
    Posts:
    153
    Fresh import and errored out

    Code (CSharp):
    1. Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/UI/UIMiniMapOnGUI.cs(121,25): error CS0029: Cannot implicitly convert type `void' to `UnityEngine.BoxCollider'
    Code (CSharp):
    1. Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/UI/UIMiniMapOnGUI.cs(145,20): error CS0103: The name `mLastPos' does not exist in the current context
    Code (CSharp):
    1. Assets/NinjutsuGames/NJG MiniMap/Mesh Version/Scripts/UI/UIMiniMapOnGUI.cs(147,25): error CS0103: The name `mLastPos' does not exist in the current context
     
  48. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    Sorry for the issues, I've submitted a new version 7 days ago but sadly its taking longer than expected for approval.

    Send me your invoice number to my email at: hjupter@gmail.com and I will send you the new version.
     
  49. zenforhire

    zenforhire

    Joined:
    Nov 5, 2012
    Posts:
    58
    Hi Hjupter,

    Can a click on the mini map and get the coordinate in the world map?
    Can I overlay an NGUI UIPanel ontop of your minimap and have it show throw transparent part of overlay?
    Can I have the control buttons for zooming NOT be on the mini map but some where else on the HUD?

    Cheers,
    Kevin
     
  50. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    627
    1. This is coming on future release
    2. Yes.
    3. Yes.