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

DMMap Minimap System 2.0! Procedural, Multilayer & Vector-like maps, uGUI! NOW FREE and OPEN SOURCE

Discussion in 'Assets and Asset Store' started by DMeville, Aug 8, 2014.

  1. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418



    DMMAP IS NOW OPEN SOURCE!!
    Get it on github here: https://github.com/DMeville/DMMap



    Edit Feb 21 2021: It's been brought to my attention that DMMap was removed (or depreciated) out of the asset store. I guess this is because of the new asset store changes, along with the fact that DMMap was submitted with a rather old version of Unity. Because of this, I've decided to open-source the project and put it on github! Happy mapping!


    -= Demos =-

    [Demos 2.1] | [Angry Bots Demo (DMMap 1.0)]


    [Version 2.2 is on the Asset store]

    DMMap is a minimap solution for easily creating vector-looking minimaps, simply draw a few shapes with the DMMapShape component, or throw some shapes into your prefabs as you're building your levels, hit the generate button and you're good to go!

    -= Features =-
    • Unity 5 Support! Now uses uGUI for all rendering!
    • Works with procedurally generated levels! [Procedural Demo]
    • Have multiple floors in your level? Not a problem! [Multi-level Demo]
    • Support for top down, and side view setup. (XY, XZ, YZ planes)
    • Vector like minimap with configurable outlines and colours
    • Runtime or editor map generation, works great for both procedural and non-procedural levels!
    • Map Overlays and masks (masks require RenderTextures in Unity 4.6)
    • Transparent map backgrounds
    • Icons (configurable with tint, icons textures, scale modes, and rotation)
    • Directional icons that stick to the edges of the screen pointing the player in right direction!
    • Waypoints! Click on the map to add a marker (marker is added in both worldspace and on the map)
    • Zooming, Rotating, Center map on Target
    • Maps are customized with configs. Make as few or as many configs as you want and switch between them easily (one for minimap, one for fullscreen map, etc)
    • Additive and subtractive map shapes
    -= Why this map system? =-

    I've taken brief looks at other map systems on the asset store, but none of which seemed to suit my needs. I was looking for a way to render "vector" looking maps, without having to go through the long and boring process of:
    • Take a top-down screenshot of my level after it's been generated
    • Bring it into Photoshop and draw my map.
    • Bring it back into unity and set it up as a map...
    • That's too much work!
    Not to mention that method requires the maps to actually be laid out at edit time. What about maps procedurally generated at runtime? The above method simply wouldn't work. DMMap fixes this problem by generating the maps for you, without wasting your valuable time drawing lines in Photoshop. Simply draw some shapes with the DMMapShape component inside your prefabs, and whether the levels are laid out, or generated at runtime at the click of a button you'll have everything generated!

    -= Links =-
    See the asset store link for more screenshots!


    -= Changelog =-

    2.1 [Released]
    + Icons now rendered invididually as uGUI images
    + Directional icons, stick to the edges of the map and point in the direction of the icon-location.
    + Waypoints. Click on the minimap to add a marker (both in worldspace and on the map)
    + Added an easy way to add behaviours to icons (for flashing, adding additional UI elements, etc)
    + Configs now have names. Can load them by name
    + Mesh layers can be assigned individual materials, useful for customizing the look of maps
    + Two new demo shaders: Diagonal and Texture
    - DrawMode.Detail removed. Can achieve better results with custom mesh layer materials.

    ----------

    2.0 [Released]
    + Full support for Unity 5 uGUI!
    + Map configs, allows for easy swapping between different setups (ie, minimap -> fullscreen)
    + Bugfixes
    - Removed legacy rendering code (legacy gui, gui cameras) and replaced it for uGUI.
    (The DMMap v1.2 comes packaged with v2.0, it can be found in the DMMap for Unity 4.6 folder, there is a separate unitypackage file for you to install the legacy version!)
    ----------​
    1.2 [Released]
    + Bugfixes
    ----------
    1.1 [RELEASED]
    + Fullscreen and minimap now use their own configurations.
    + Multi-level maps now supported + Demo Scene! [Multi-level Demo]
    + Procedural generation bugs fixed + Demo Scene! [Procedural Demo]
    + API Documentation added [API Documentation]
    + Quickstart PDF to be included with the asset [PDF]
    + Basic Top down example scene (XZ plane)
    + Sidescroller example scene (XY plane)
    + misc other fixes and optimizations
    ----------
    1.0 - Initial version
     
    Last edited: Feb 22, 2021
  2. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Mmmmmm very interesting. I've found the current minimap solutions lacking in different areas.

    • Does it work with X/Y plane, or X/Z, or configurable?
    • Plans for Fog of War?
    • A nice tween when opening/closing fullscreen map would be cool, even with preset curves or something.
    • Hrm, could probably write my own buttons without issue, but I am sure someone else will complain they aren't there. Since this isn't tied to a UI framework, I suppose that's cool.
    • How is performance / draw calls? Will it work on mobile well? (forgive me if this is a stupid question)
    • Is your code vaguely readable or is there going to be (I am not kidding here) if (something) if (something) if (something) doSomething(); all on the same line? It's like, oh hey I say you get all the source code, but I will make a formatter that will completely destroy your brain.
    • How is the rotation determined for the icons/map? Like, does it just take the main target's rotation, or does it run some funky formula hoping to figure it out; however, since my main target is rotated -270X to face the camera for a 2.5D game and work with the stupid tilemap, is it going to think I'm upside down? So long as I can find the rotation code, I can make it work with my silly upside down world I'm sure.
    • Are the icons vectors as well, or textures or something?
    • Does it run a second camera (I presume it does, but ought to ask.)
    Demo was nice, looks pretty good. I already own 2 map systems, maybe third time is the charm.
     
  3. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hey Yukichu, you wouldn't happen to be the same Yukichu who has helped me out numerous times on the UnityPark forums, would you? :) All great questions, I'll try my best to answer them!


    Currently, it only works with the X/Z plane - although it should be very easy for me to change that and make it configurable. I'll add it to the list of features for the next update. Just so I understand correctly, do you mean in situations where, for example you have a 2d game with XY being the "ground" plane? With a camera pointing "forward" rather than "down"?

    No plans for fog of war currently. If there's enough interest I could tackle it. It wasn't something I require for my project.

    Again, if there's interest for something like this I could add it. It's not something I required for my project so I omitted it. Whenever the new Unity UI comes out I'd like to add support for that.

    A valid question! I have not done any testing on mobile, but performance is pretty good. I have noticed 0 slowdown from that map, and the profiler shows that it only uses 0.5% of the total frame time. Of course there are always optimizations to be made, and I haven't done too much. I already have an update ready to go that has a few more optimizations. The map uses a max of 3 draw calls. One for the quad that the map is being rendered to, and two to render the vector map mesh (one for the mesh, and once for the outline)

    I think it's very easy to read, although I wrote it so perhaps I'm slightly biased. Haha. I may overuse curly braces. :)

    The icon rotation is simply a 1:1 of the y rotation of the gameobject it's attached to. It would be very easy to add any offset or any other magic to get it work.

    The icons are textures thrown onto a quad, whereas the map is a simple mesh generated (with a little bit of magic) from the sum of all the map shapes.

    Yes, two extra cameras, actually!
    Thanks :) I hope I answered your questions well! Check out the Documentation link for a bit more info it if you'd like. There's also an 11 minute video tutorial linked on the documentation page of me talking through how I set up the map with the angry bots demo!
     
    Last edited: Aug 8, 2014
  4. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I am indeed the same Yukichu from the UnityPark forums :)

    Box2D physics currently only work on XY plane, which is why I asked about the orientation. Having an option to change between the two would be excellent.

    Well, here's my vote for a fog of war, of any sort, or at the very least some sort of built-in radius for the target where the enemy icons would not appear, and disappear once they leave the radius.

    The GUI stuff... I am sure some other people might vote for premade buttons, but really it's not that big of a deal to me. Might help polish up the asset and get other people interested who don't want to get dirty, dunno.

    It seems to be the "thing" to have a ton of customization and options so those that don't program so well and just check some boxes and change some numbers in the inspector. I guess the real question is, how is this asset going to grow and evolve? What are the future plans? Any ideas, or just looking for input?

    My votes: XY orientation and Fog of War (or something similar or completely innovative) :)

    Everything else sounds good, though I'll have to wait for an XY orientation before I dive in.
     
  5. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    First of all, I really enjoy what I see with regards to generate the minimap. As I'm utilizing random worlds, this asset is something which seems to be capable of what I need.

    I have a question with regards to multiple heights - is it possible to display only that piece of the minimap which complies to the current height level of the player? I'm planning to have different heights within a map and displaying the current height (and the possible switch of the height level) would be important to me.

    Thx in advance
    Wyl
     
  6. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Using a different plane other than XZ should be in the next update, which should be coming sometime next week, regarding approval takes the same amount of time as the initial submission takes.

    I'm really just looking for input at this point. The map is working for me for what I need it for, but surely I'll be adding stuff. I have a few optimizations ready to go, along with a few more features I've been thinking about (different fullscreen overlays,masks, "screenshoting" the map mesh and stitching them together to increase performance, etc) I haven't given much thought to FOW, as I've read it's very easy to "cheat" FOW and disable it, but I'll definitely be looking into it :)

    Thanks!
    It's an interesting idea, though, currently that's not possible. The map only allows you to generate "one" mesh. However I'm sure it would be pretty easy to store them as an array, and toggle them on and off depending on your height. Thinking about it now that's probably similar to how games like LoZ did dungeon maps. I'll look into this and see what I can do :)
     
  7. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Just submitted an update with the following changes and new features! Lots of housekeeping stuff!

    1.1 - + Fullscreen and minimap now use their own configurations.
    + Multi-level maps now supported + Demo! [Multi-level Demo]
    + Procedural generation bugs fixed + Demo! [Procedural Demo]

    + API Documentation added [API Documentation]
    + Quickstart PDF to be included with the asset [PDF]
    + Basic Top down example scene (XZ plane)
    + Sidescroller example scene (XY plane)

    + misc other fixes and optimizations
     
    Last edited: Aug 12, 2014
  8. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hey guys, the 1.1 version update is now live! With a whole bunch of improvements, better documentation, api docs, and a bunch of demo scenes. [Assets Store Link]
     
  9. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    MMmmmmmm looking good. Some very interesting stuff.

    Thoughts / ideas / wishes / wants / gravy / mmm poutine:
    - Icon max size when scaling in (aka don't make icon any bigger than X when zooming in)
    - Icon scaling smaller with a min size when zooming out
    - Put some sort of tween for opening/closing the larger map
    - Ability to lock rotation of player so map rotates with the player
    - Fog of War *cough cough* :p
    - Oh yeah, is there a way for mouse detection over icons in the minimap? I could handle the tooltip/functionality if there is just a simple way of 'mouse over icon blah' type thing.

    Will pick this up when I have some free cash laying around.
     
  10. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hey Yuikichu, all great ideas! I'll add them in as soon as possible.

    You can already make it so the map rotates with the player :)
     
  11. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I have a question. Suppose I have a hex grid, with some tiles marked as 'walkable' and some tiles marked as 'unwalkable'. There are units on the hex grid. Would your minimap system be able to generate my level minimap and have the nonwalkable grid spaces be marked as blocked off or missing sections?



    Another question: If my players are able to set spots on the minimap from unwalkable to walkable, would it be possible to dynamically update the minimap in-game? I would assume so since you support procedural generation already.
     
    Last edited: Aug 22, 2014
  12. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    It depends on what you mean by blocked off I suppose - but the two ways I can think of:

    1. Generate your hex grid, each tile having a DMMap Shape component with a hex shape. When you toggle the walkable value, you could set the shape DMMap shape component to be active or not. Then to commit the changes regen the minimap. This method completely removes the hex tile from being drawn on the minimap.

    In a crude example, in this image [http://i.imgur.com/7fBxhGw.png] I have a bunch of green hex tiles (active), and some red ones (not active). When I hit generate I get something like this [http://i.imgur.com/JkLPxyt.png].

    2. Generate hex grid with all tiles (regardless of walkable value) and draw them to the map, and give each unwalkable tile a map icon notifying the player that the tile is unwalkable.​

    Yep, simply make your changes and regen the minimap!
     
  13. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    A user found a bug that only happens in specific cases. Regarding generating the map if you have shapes completely inside holes created from other shapes. (Like in the attached image)


    This bug will be fixed in the next version, but if you are running into it now, send me a message or email with your invoice number and I'll get you the fixed version!
     
  14. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Version 1.2 is live!
     
  15. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    Hi,i just wondering if i can use the map only on a certain scene, i'm making rpg game so i only need the map when i enter in a dungeon or a forest but when i'm at village,the map will not show up
     
  16. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    DMMap version 2.0 has just been submitted to the asset store. (sorry for the long delay!!!)


    Yes, you absolutely can!
     
    Last edited: May 19, 2015
  17. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    I want to make a mini map for my race track like mini map in Asphalt 8 game. Is is possible ?
     
  18. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Yes! Depending on how you create your racetrack (procedural or is it laid out in the editor?) there are different methods on creating the map the minimap renders. If you're laying this out in the editor it's super simple and should only take a few minutes to set up.

    DMMap also supports everything you need to get a nice looking map similar to what I see in screenshots for the Asphalt 8 game. (semitransparent, soft edges masking off the map, icons, etc)
     
  19. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Wow, look great ! Will buy it now !
     
    DMeville likes this.
  20. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    I've just submitted an update a few hours ago that has support for Unity 5 (and has some cool new features!) , it should be available in a few days (regarding approval doesn't take too long!). I've also reduced the price of the asset so I recommend waiting until the new version is approved :)
     
    CoderPro likes this.
  21. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    DMMap Version 2.0 is now available on the asset store!!
    (Reduced price - 25% off!)

    https://www.assetstore.unity3d.com/en/#!/content/20101


    The biggest change is that it now supports Unity 5 and uses uGUI for all rendering and layout things. Because of this I removed the now redundant code for legacy gui and the gui-camera method. This means that if you'd like to use the new version you will have to resetup your DMMap settings again! Most code was changed in the DMMap class regarding visuals and setup but the mesh/map generation is still the same so you won't have to redo any Map Shapes - just redo the layout/setup of the DMMap component. (zoom levels, map colours, positioning, masks, overlays, etc)

    The new version also has a DMMapConfig, which is a nice container for all layout and setup things - which also allows for easy switching between layouts (ie minimap -> fullscreen map). Simply set up two configs on the DMMap object and swap between them with DMMap.instance.LoadConfig(int).

    Additionally, I have added a DMMap4.6.unitypackage (DMMap/DMMap for Unity 4.6) if you'd like to use the legacy version - all docs and code is there. Just drag it out to your root folder - delete the DMMap folders and install that DMMap4.6 Unitypackage!

    Changes:
     
  22. Rusted_Games

    Rusted_Games

    Joined:
    Aug 29, 2010
    Posts:
    135
    I´m wondering if the DMMap FullScreen functionallity could be extended to support more complex behavior like the seen in games like Final Fantasy where you can:

    Zoom In-out inside the fullscreen map
    Add Tags or Waypoints reminders
    Display location icon description

    I´m still on R&D process and deciding whether I´ll use OrkFramework or PlyGame as platform to get a quick prototype.

    Thanks for your time and help
     
  23. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hey @alardaen
    You can already zoom in and out when fullscreen map is active using the zoom property.

    There is no current built in support to tag the map with waypoints, but that sounds like a great idea that I'll definitely play around with. Being able to convert where you click on the map to game-world coordinates is the only thing that's stopping you from doing that now, but once you have those coordinates you could create a new (empty) gameobject with a Map Icon and it should appear on your map.

    Could you clarify what you mean by "display location icon description"? I regretfully haven't played any FF games past FF1 :)
     
  24. Rusted_Games

    Rusted_Games

    Joined:
    Aug 29, 2010
    Posts:
    135
    Thanks for your quick response.
    Take a look at the image map, were you can display the icons section with their description

     
  25. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @alardaen If you want to add UI over the map you definitely can already! DMMap is rendered into a uGUI Image, so you can easily place text boxes and images over the top (for things like the controls on the bottom right, the icon key on the left, etc)

    For the bits on the map itself "North Station", etc, that's a bit more tricky and something I'll have to explore if I can devise a solution. Right now the icons are rendered into the map itself, so perhaps removing that and showing the icons as individual uGUI images would be better... hmm. I have some ideas but it will take a bit of time :)

    Thanks for the great idea!
     
  26. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,

    Got it working in the end.
    I really like the system and left you a review as well :)

    I also think drawing the icons as individual Images might be a lot better. For one it would allow pixel perfect icons, but it can also allow easier adding some features like animation, enabling/disabling etc on the icons.

    I also have a feature request if that is possible.
    To have an option for some icons (selectively) to show sticked at the borders even if outside of the minimap borders, possibly with the ability to fade out by distance.
    So for example a quest or player unit icons, would always show even if far away, but an enemy icon would not unless the enemy is within the minimap.


    Just some ideas. No rush and good job with this.

    Cheers!
     
    Last edited: Jun 1, 2015
  27. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @nuverian

    Thanks!!
    I think you're right about the icons, they should definitely be switched over to individual icons which would make things like the feature requests 100 times easier. The idea of having icons sticky to the sides (to show which direction the icon is) sounds really handy, I'll get working on it!
     
    nuverian likes this.
  28. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    You are very welcome :)
    Thanks a lot! Glad to know there are some updates in the way.

    Cheers!
     
  29. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Really nice looking asset!

    Is it possible so that all unexplored areas are not visible on the map- and they only appear after the player has explored them? Can we do that with Dmmap? Thank you
     
  30. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @mdotstrange: Thanks! Currently you can "kind of" do this, with a bit of work. Right now you could set up your map shapes so each "room" is on a different map layer, and (using a trigger in your rooms, perhaps) keep a note of which layers have been explored - then simply make sure all explored layers are toggled on!

    Hope that helps!
     
  31. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Thanks for the reply- added Dmmap to my wishlist- looking forward to purchasing it as soon as I can- thanks
     
    DMeville likes this.
  32. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    +1 vote for fog of war. ;)

    I hope that I can be crafty enough to implement FoW on top of your asset. Just tried the demo. Stoked! I will be buying this shortly. :)
     
  33. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Just purchased :)
    +1 vote for fog of war and/or anything that would help create a map that only reveals itself once the player visits the area
    like this example from the Castlevania series- thanks!
     
  34. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi, do you have some documentation on the proc gen and multi level implementations?
    Also btw, your demos look all black, as if there is no light source in the scenes.
     
    DMeville likes this.
  35. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hi @Eyehawk

    Do you mean the demos found here: http://dylanmeville.com/Unity/DMMap5/DMMapDemo.html
    No one has mentioned any problems viewing this link, and it all plays well for me. Hmm, not sure what the problem could be.

    There is no written documentation for those demos, but the working demos are included with the asset and implementation is pretty straightforward :)

    For the procedurally generated levels (which works by instantiating "room" prefabs, where these rooms already have map shapes defined). Once all the generation is complete and the map is ready you simply need to call
    DMMap.instance.Generate(); somewhere in your code!
    If you wanted you could also create the map shapes in code, but this might take a bit more work. Setting them up visually is definitely the easiest.

    For the multi-level demos take advantage of the "Layer" property on DMMapShapes, and combines any shapes on the same layers, but also makes a separate map for each layer. So if you have three shapes with layers 1, 2, 3 it's similar to having three different maps. In code you can then toggle these layers on or off.

    In the demo I'm doing this based on player height with this code:
    Code (CSharp):
    1. void Update () {
    2.         if (this.gameObject.transform.position.y <= 14f) {
    3.             DMMap.instance.SetActiveLayer(0);
    4.         } else if (this.gameObject.transform.position.y <= 30f) {
    5.             DMMap.instance.SetActiveLayer(1);
    6.         } else {
    7.             DMMap.instance.SetActiveLayer(2);
    8.         }
    9.     }
     
  36. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    I think he means the demo scenes that come with DMMmap- I just tried them and the map is black on all of them like this
     
    DMeville likes this.
  37. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @Eyehawk @mdotstrange Thanks. I just opened up a new project and imported the DMMap package from the asset store and confirmed what's going wrong.

    When you import the package there's one simple step that needs to be done before anything works, and that's setting up a new layer for DMMap! Simply go to the top right corner of Unity and click on the "Layers" drop down, click the "Edit Layers" button at the bottom of that drop down, and type in "DMMap" in any of the empty text boxes. This is a per-project thing, and has to be done manually (can not be done automatically by the package, as far as I know)

    (This step is also explained in the Readme.txt and the DMMap-v2 quickstart pdf found in the main DMMap folder of the package!) :)
     
    imaginationrabbit likes this.
  38. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    I created a quickstart video to help a user try and resolve some issues with setup, I've also added a link to it in the link section of the main post.

     
    imaginationrabbit and nuverian like this.
  39. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    A user found a small "problem" with DMMap, that will cause the demos and DMMap prefab to not function properly without tweaking.

    DMMap and the demos use the first user layer by default ("User Layer 8"), and DMMap prefab expects this layer by default. If you'd like to use a different user layer you can, but you have to change the culling mask on the DMMapCamera (child of the DMMap prefab) to have nothing but your user layer selected.
     
  40. IndieGameHustle

    IndieGameHustle

    Joined:
    Jul 25, 2012
    Posts:
    66
    Just wondering , is there way to have the Camera focus using a TAG instead of Transform?
    I am using a framework that places the Player at playtime instead of having the player already in the scene.

    Thanks in Advance




     
  41. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Not built in, but you can set the focus transform with code anytime after Awake(). Something like this should work!
    Code (CSharp):
    1. DMMap.instance.configs[0].objectToFocusOn = object.transform;
    2. //or
    3. DMMap.instance.configs[0].objectToFocusOn = GameObject.FindWithTag("Player");
     
  42. IndieGameHustle

    IndieGameHustle

    Joined:
    Jul 25, 2012
    Posts:
    66
    Hello,

    here is my code:

    It gives a error: " unity cannot implicitly convert type unity gameobject to UnityEngine.Transform
    I may be not applying it correctly.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class assignTagDMMap : MonoBehaviour {
    5.  
    6.     // Use this for initialization
    7.     void Awake () {
    8.  
    9.  
    10.         DMMap.instance.configs[0].objectToFocusOn = GameObject.FindWithTag("Player");
    11.  
    12.    
    13.    
    14.     }
    15.    
    16.     // Update is called once per frame
    17.     void Update () {
    18.    
    19.     }
    20. }


     
  43. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @GameIntern: Oops. Yes it expects a transform, and FindWithTag returns a gameobject. Just add .transform:

    Code (CSharp):
    1. DMMap.instance.configs[0].objectToFocusOn = GameObject.FindWithTag("Player").transform;
     
  44. IndieGameHustle

    IndieGameHustle

    Joined:
    Jul 25, 2012
    Posts:
    66
    @DMeville Thank You!

     
    DMeville likes this.
  45. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
  46. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Triangle.NET Beta 3 - the one you linked was the correct version if I recall correctly! I may have made some slight modifications made to the library though. :)
     
  47. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Hi Dylan,

    I'm really like the approach to minimap generation you are using. Will suit my project fine, however one question before buying (sorry if it was asked before) but can we position the minimap freely on our UI. All demo's use fixed corner positions but our project needs a minimap centered below.

    Kind regards,

    Wim
     
  48. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Yep, you sure can! The minimap is rendered into a uGUI raw-image, so you can position it just like any ui element (this includes in worldspace!)
     
  49. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    And bought it! In for some testing ;)
    May I however give you a suggestion? Can you namespace your scripts please? This to avoid conflicts with our own code. (Not that this is an issue now as we namespace our own code, but you never know an assetstore publisher is using some same classes :D)
     
    hopeful and DMeville like this.
  50. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Hmm, another remark. When testing demo's procedurallevel and topdown a script is missing on the DMMap component. Sorry for beeing the guy looking at the demo scene's to grasp the in and out's :rolleyes:
    I really like the multilevel support, you should advertise this more on the asset store! Makes my live even easier :)