Search Unity

Log info for map tiles in Civ like game

Discussion in 'Scripting' started by tayzirov, Nov 23, 2017.

  1. tayzirov

    tayzirov

    Joined:
    May 21, 2015
    Posts:
    7
    Hey All,

    I'm building a small civ-like game, and I had some design issues I could use some advice on.

    I want to track stats and info of each map tile, so I'm making a public class called TileInfo.

    1) Does it make more sense to attach the HexInfo script to the Prefab so that's it prepped ahead of time, or should I attach a Script object to the Tile when it's created? Does it make a difference?

    2) If I want to save the state of the object Tile Info, does it make more sense to save the info on those tiles to a serialized object or to an external data store, like a JSON/XML file?