Search Unity

[2D] How do you export Unity's tilemaps?

Discussion in 'World Building' started by nelsongames, Jun 8, 2018.

  1. nelsongames

    nelsongames

    Joined:
    Jun 6, 2018
    Posts:
    8
    I want to start a 2D Top Down tile based game. One of my concerns is that I am also making it multiplayer (writing the server in either NodeJS or Java), the server will need a copy of the map to be able to tell whether or not any client manipulation has been going on.

    I want to use Unity's built in editor because it's nice to actually see where everything relative to the game, instead of having to create my own editor, and load the map on startup.

    My question is: how do you export Unity's tilemaps into a format that can then be read outside of Unity?
     
  2. nelsongames

    nelsongames

    Joined:
    Jun 6, 2018
    Posts:
    8
    Anyone know?
     
  3. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Write your own. It shouldn't be too hard. You just need to export each layer as a JSON array and width/height/hierarchy position variables. Each location in the map should reference an ID or name which the tiles can be looked up with when loading again.