Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[C#] Map That Draws From The Map? Fog Of War?

Discussion in 'Scripting' started by SwaggyMcChicken, Mar 1, 2016.

  1. SwaggyMcChicken

    SwaggyMcChicken

    Joined:
    Apr 13, 2015
    Posts:
    108
    I'm developing an RTS which uses a map UI that is drawn on its own based on what the player has explored in world, kind of like that fog of war mechanic you typically see, both in-game and on the minimap. I'm also wanting the UI to look a little more like a simplified map (There not being that many colors), with green blobs for forests, gray for stone, etc etc. Possibly height colorations. I have a few ideas on how to get this started with the grouping of stuff to paint on the map, like having all trees within a 5 meter area group together, have buildings show up as icons, or use the terrain height map. But, I have no idea at all on how I could start with the UI part. How do I translate the stuff on my map into a 2D UI with intractable parts? Does anyone have any tips?
     
  2. ericbegue

    ericbegue

    Joined:
    May 31, 2013
    Posts:
    1,353
    Could you reformulate your question? Do you want to generate a minimap from your map?
     
  3. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    you need to look into the concept of multiple cameras and how layers interact with cameras etc. there are loads of tutorials on minimaps in unity on youtube
     
  4. SwaggyMcChicken

    SwaggyMcChicken

    Joined:
    Apr 13, 2015
    Posts:
    108
    Generate a minimap from my map. Not like a mini map off to the side of your screen but like a UI that you can open whenever. I need it to be able to be interacted with.

    OK thanks for the suggestion
     
  5. ericbegue

    ericbegue

    Joined:
    May 31, 2013
    Posts:
    1,353
    How do you edit your map?
     
  6. SwaggyMcChicken

    SwaggyMcChicken

    Joined:
    Apr 13, 2015
    Posts:
    108
    It's planned to be random.