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

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. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    hmmm im not sure what you mean by inspector... check out this screenshot. I am showing you that the issue is coming from the UIMiniMap Script. See the script is disabled, and look at the FPS it's up, but if I enable this script FPS will drop.



    I am looking as profiler also, it shows high % in camera render but that is usually normal for camera and render to be higher than most I think, but look at UI MiniMap in my Profiler it shows 34% that too much coming from your asset, which does not make sense...

     
  2. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Thats really weird, I have never seen that method taking so much, I just tested here and seems to be fine.
    Would you mine to test with one of the example scenes? Maybe there is something wrong with your scene?

    Here you can see:
     
  3. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Yes, it seems you are right there is nothing wrong with the example scene. I am not sure why this is happening in my scene as there are no errors generating in the Console related to UI, and I even disabled most of the game objects in the scene to see if there was any conflicts but that didn't do the trick... still it remained low FPS with UI Mini Map enabled. Very weird, if you have any ideas at all that would be appreciated, but I guess if it works in your example scene, then we must have something not setup correctly.
     
  4. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    @Kuroato Let yeah this is very weird, I'm so sorry you are having this issue, do you have any MapItem set anywhere and target?... anyways I tried even without any of that setup and it does work fine. You can add me to your skype so I can help you with this. Here is my skype: hjupterc
     
  5. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Thank I will add you, maybe we can do a Remote Screen Share through Skype if Possible it's a very strange issue.
     
  6. Hoskins355

    Hoskins355

    Joined:
    Jan 3, 2013
    Posts:
    142
    I am getting an error "The name `mapRenderer' does not exist in the current context" line 73, 74, 74 NJGMapOnGUI
    I am using version 1.5.6 unity version 4.5
     
  7. nigel-moore

    nigel-moore

    Joined:
    Aug 28, 2012
    Posts:
    26
    Got my minimap / world map up and running in my none-game - great asset thanks. I also quite easily managed to hack into your event system to enable me to capture info about the scene object (and its components) that the MapIcon component is attached too - nice.

    But, what I'm struggling with now is that the map icons (in the world map) always occlude (are drawn after) the tooltip! My world map can contain quite a lot of icons and the tooltip info is quite important to the user, this is a bit of a problem for me. Is this something you are aware of, or can you suggest how I might draw the tooltip over (after) the icons? I have tried messing with the Depth parameter on the Tooltip panel (tried up to 650) but with no success. I would really appreciate any input / help anyone could offer me here (especially from @hjupter :) )
     
  8. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    This is definitely a bug I just submited a small update fixing this and other things to the asset store. PM me your invoice # if you want the package ASAP.
    Try changing the sort order to something higher to 1, sorry for the troubles I'm going to use NGUI UITexture instead on the next update to avoid depth issues.
     
  9. Hoskins355

    Hoskins355

    Joined:
    Jan 3, 2013
    Posts:
    142
  10. Hoskins355

    Hoskins355

    Joined:
    Jan 3, 2013
    Posts:
    142
    That 1.5.7 file did not include the scripts just .pngs

    Still getting same errors. What lines do I need to change?
     
    Last edited: Oct 17, 2014
  11. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Well you had to delete the previous version first, are you using the NGUI or mesh version?
     
  12. nigel-moore

    nigel-moore

    Joined:
    Aug 28, 2012
    Posts:
    26
    Hi @hjupter - I may be missing something obvious here, or it may not actually b possible with your system but I would like to rotate the world map by 90º when it is being shown on the screen, is this possible?
     
  13. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    there are 7 errors with the latest NGUI version (3.7.6p2 (November 7th, 2014)).

    Edit: Everything works fine, i only forget to reimport the NGUI part.
     
    Last edited: Nov 10, 2014
  14. Raptorsbane

    Raptorsbane

    Joined:
    Aug 30, 2014
    Posts:
    11
    Hello there, I imported the mesh version and I'm getting this console error, Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/UIMapBase.cs(1305,31): error CS0103: The name `UICamera' does not exist in the current context do you know how to fix it? Thank you!
     
  15. Raptorsbane

    Raptorsbane

    Joined:
    Aug 30, 2014
    Posts:
    11
    Hello there, I imported the mesh version and I'm getting this console error, Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/UIMapBase.cs(1305,31): error CS0103: The name `UICamera' does not exist in the current context do you know how to fix it? Thank you!
     
  16. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    321
    If anyone's faltering or considering buying this asset: I've bought it about 2 months ago, and it really rocks!
    Easy to setup, and you can make it look and act like you need to and want it to.
    (No regrets. Get it! )
     
  17. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    80
    @Raptorsbane if you edit the line 1305 of the "Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/UIMapBase.cs" file from this:

    Vector3 mScreen = UICamera.currentCamera.WorldToScreenPoint(planeRenderer.transform.position);

    to

    Vector3 mScreen = Camera.main.WorldToScreenPoint(planeRenderer.transform.position);

    it works without NGUI.
    But not with the Unity3D 4.6 Beta. For the Beta there are many scripts to change with compiler commands like this:
    #if UNITY_4_0 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5


    @hjupter You could change these compiler commands to request older versions of Unity3D instead of the new ones:
    #if UNITY_3_5
     
    DizzyTornado likes this.
  18. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    I couldn't understand from description, does this asset support unity 4.6 "new" gui system, or will it support it soon?
     
  19. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Sorry guys I've been a bit away from here due to different things: holidays, vacations and now sick

    Hmm, I have not tried this, I will try it.

    I submitted a fix for this to the asset store weeks ago, looks like it wasnt updated. Send me a PM and I will send you the fix.

    Thank you a lot for the kind words. I'm glad you like, there is a better version coming soon.

    Thanks for this, I submitted a fix for this weeks ago I will have to re-submit again, I will add the fixes for UNITY 4.6 too

    I'm working on a new version which includes Unity 4.6 support, hopefully should be done by early next month :)
     
    nigel-moore and hopeful like this.
  20. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Greetings hjupter. Your asset here looks very promising - after reading through as many comments as I care to and not seeing anyone ask this I thought I would go ahead and do so. :)

    Our game is a procedurally generated, voxel based game with infinite terrain. An initial chunk is generated around the player when they start in, then as they move through the world, new terrain forms in front of them and old terrain is removed from behind them so there is always a constant in regards to how much terrain is showing, but the actual terrain is always changing (like Minecraft, our players can dig, build and terraform their worlds on the fly as well - unlike Minecraft our voxel world is smoothed, not blocks). With those things in mind, would your Mini-Map system work ok in our project or do you think there will be some issues? Thanks in advance for any advice you have about this!
     
  21. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Hey Tethys, thanks.. well there are has been other customers who use my minimap asset with infinite terrains, all you have to do is set the render mode as "Dynamic" and call NJGMap.instance.GenerateMap() everytime you want to update the minimap :)
     
  22. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Rockin, thanks for the quick reply! I will grab this asset today.
     
  23. Raptorsbane

    Raptorsbane

    Joined:
    Aug 30, 2014
    Posts:
    11
    Awesome that worked perfectly :) Thank you!
     
  24. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    80
    @Raptorsbane and @hjupter
    This works only for the main camera.
    On some cases of multiple cameras it could be needed to get a camera with the layer set to UI.
    In this case, this could be done with a little function:

    Code (csharp):
    1.  
    2.         public Camera FindCamera(string _sLayerName)
    3.         {
    4.             foreach (Camera _oCamera in Camera.allCameras)
    5.             {
    6.                 if (_oCamera.gameObject.layer == LayerMask.NameToLayer(_sLayerName))
    7.                 {
    8.                     return _oCamera;
    9.                 }
    10.             }
    11.             return Camera.main;
    12.         }
    13.  
    And can be called like this:

    Code (csharp):
    1.  
    2. Vector3 mScreen = FindCamera("UI").WorldToScreenPoint(planeRenderer.transform.position);
    3.  
     
  25. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    i have trouble to make the minimap (3d) visible in NGUI. The scene view (which is parallel open to the game view) works perfectly, but the game view shows nothing...

    minimap version: 1.5.6
    NGUI version: 3.7.6p2
    Unity (Pro) version: 4.5.5f1

    Workaround: I added a NGUI widget to my own NGUI root and under this i added the NGJ MiniMap (3D). After this the scene view worked correcly as i described and the game view showed nothing. I don't know exactly the problem, but it seems to be that NGUI don't update the NGUI tree after adding your components on it (probably you should update your NGUI version and drop the old anchor components). The solution was for me to disable the NGUI root and enable the NGUI root again (this must trigger a full update in NGUI). After this the map is visible in the game view.....
     
    Last edited: Nov 19, 2014
  26. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    In NGJ MiniMap (3D) the 'WorldMap' Prefab the zooming in/out is broken. The buttons are clickable, the methods will be called in the UIMapBase.cs, but it seems that the LeenTween doesn't work here. For the 'MiniMap' these zoom in/out methods works fine, they call the same methods in the UIMapBase.cs.

    minimap version: 1.5.7
    NGUI version: 3.7.6p2
    Unity (Pro) version: 4.5.5f1
     
  27. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    When i import your asset all my asset windows go fishing.
    They all literally vanish, and your asset's windows does appear either. This in in 4.5.5.
    I bought your asset these past days and havent been able to use it yet. :/
     
  28. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Ok, checking this out.

    Sorry to hear you are having issues with it. Are you getting any error on the console? This is weird because my minimap asset doesn't do anything with inspector windows if thats what you are talking about, maybe for some reason you got an error?
     
  29. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    its not the inspector. like 2dtoolkit for instance, has its own editor windows, with options and prefs.
    I import your assets and the window option doesnt show up anymore. its really weird.
     
  30. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    You might have errors on the console then, would you mind to check it out and tell me what is it?

    Btw what version are you using Mesh or NGUI?

    PM me your invoice # there is a fix for the Mesh version.
     
  31. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Assets/NinjutsuGames/NJG MiniMap/Common/Scripts/Internal/UIMapBase.cs(1305,31): error CS0103: The name `UICamera' does not exist in the current context

    Sent you the number.

    I use 4.5 pro, but 4.6 and 5.0 in beta.

    No GUI addons.
     
  32. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    I just replied your PM :)
     
  33. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    Hi hjupiter! I'm using your minimap for an RTS and need to know if it is possible to convert a mouse click on the minimap to a world coordinate (as I need this to move my camera).
     
  34. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    total guess. use the UIcamera's Camera.ViewportToWorldPoint in some fashion.
     
  35. nigel-moore

    nigel-moore

    Joined:
    Aug 28, 2012
    Posts:
    26
    Thanks, I am presently just rotating the WorldMap panel -90º and then de-rotating with each child object individually
    - bit of a ball ache but it works ;-)

    Tried looking through all the posts here and couldn't find this question so - I would like to use touch input to pan and zoom around the world map but cannot seem to find a way to do this. So would this even be possible with your framework @hjupter or would I need to try and roll something of my own?? (This last option would not be my favoured one tbh ;-) )

    Actually scrub my previous comment - rotating the WorldMap the way I described above is not optimal ...
     
    Last edited: Nov 25, 2014
  36. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    Thanks, solved it differently. Ready-made functions for this would be great though.
     
  37. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Line 138 UIMiniMapOnGui.cs

    #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5

    which causes the new 4.6 to bomb on

    Line 143 onwards...
    Code (csharp):
    1.  
    2. #else
    3. if(mLastPos != rendererTransform.localPosition)
    4. {
    5. mLastPos = rendererTransform.localPosition;
    6.  
    (just add the new version...)
     
    Last edited: Nov 27, 2014
  38. Doctor_Neuron

    Doctor_Neuron

    Joined:
    Nov 27, 2014
    Posts:
    7
    Holy hell, I try this months after tossing it and the same problems with UICamera, great. I really hate this asset. No matter what its like pulling teeth just trying to import it with every version or update unless you use NGUI. Back in the trash pile it goes. Do you not test any of your releases first?
     
    Yukichu likes this.
  39. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    He upped the fix for that issue to the store a few weeks ago - which you can see if you read about a page back - I PM'ed him for the fix, which he delivered. Hope it get's you going.
     
  40. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    I've been playing with this and I get some weird unwanted behaviour. Shall I record a video of what's going on to better explain? Thanks
     
  41. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    I'm working into adding this for the next update :)

    Sorry about that I missed that UICamera reference on a non NGUI script, anyways its fixed since weeks ago, you can PM me with your invoice number and I will send you the fix

    Thanks a lot for the help so far here on the forums :)

    Sent you a message on skype.

    Everyone the new uGUI version is nearly done I will keep you guys posted!
     
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I made this work with infinitely sized-maps by disabling the actual "map picture" rendering and just using the icons overlaid on a static "grass" picture. Tried it with hundred(s) of icons in this configuration and got very surprisingly good results.

    Is there a way to get it to focus reliably on a named layer group? and to retrigger a world map redraw when a player crosses a certain threshold? basically I have a 3x3 grid that moves itself when they step out of the center tile..


    Like that. as explained more fully here So I can give them all the same layer (say), but when I tried it I didn't get what I expected.

    Is this a supported configuration? Many thanks.
     
  43. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    You can try to play with the NJGMap zones "Generate On Trigger" feature or create your own script which sets the map bounds manually and generates on trigger. Anyways sounds like a good idea to add custom bounds to map zones.
     
    twobob likes this.
  44. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    yeah, thanks, I did play with that. Didn't do what expected. Hey ho. Probably did it wrong.

    Hmm, I'll try again, if you're saying it can be done... then I can make it do it... Simple as that. Just need some effort on my part.

    thanks.
     
  45. Darkling420

    Darkling420

    Joined:
    Apr 20, 2013
    Posts:
    27
    I'm sick of scouring thousands of emails for an invoice number to receive support for your errors. Instead, I updated my review to one star on the asset store. Thanks for nothing.
     
  46. Darkling420

    Darkling420

    Joined:
    Apr 20, 2013
    Posts:
    27
    Good luck. It will always continue with this error, even a year later. EVERY update.
     
  47. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I have to concur that it would not hurt to maintain a list of previously confirmed sales.
    Expecting the client to constantly re-authenticate their veracity is very wearing.

    When someone sends their invoice number once, that once should be enough.
    Kind regards,

    And that is not directed at hjputer, just in general, that is very lazy customer service practice.
     
  48. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Sorry to hear this, if you have sent your invoice # before maybe you could have tell me that you did it already.. anyways this mesh version has become a headache since there wasn't much people using it, I'm working on the new version which its simplified/painless/better and works with the new Unity GUI. I understand your pain with this but you could at least try to talk to me I would be more than happy to help you out, just send me an email if you need my help.

    This a good idea, I will definitely see what I can do about this. Thanks
     
    hopeful likes this.
  49. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I get

    Code (csharp):
    1. LeanTween - You have run out of available spaces for tweening.
    2. To avoid this error increase the number of spaces to available for tweening when you initialize the LeanTween class ex: LeanTween.init( 800 );
    3. UnityEngine.Debug:LogError(Object)
    When I use a lot of objects.

    a) Is the maximum amount noted anywhere?

    b) I find no LeanTween.init (obviously) nor could I find the reference to the instance easily (which is doubtless there)

    Please could you consider either pointing me to the docs that tell me how to set the maximum count - or - add an option to set a maximum count :)

    Thanks
     
  50. jdurnil

    jdurnil

    Joined:
    Dec 26, 2013
    Posts:
    16
    I have purchased the njg system and am having to use the mesh version, are there no ongui versions of the zoom in, zoom out, lock and worldmap buttons you see on your example, do I have to create my own?, if this is not available will this be available when this is made compatible with 4.6 gui?