Example #1
0
 private void Start()
 {
     if (tiles == null)
     {
         tiles = FindObjectOfType <BuildingTiles>();
     }
 }
Example #2
0
        private void Start()
        {
            var data = JsonUtility
                       .FromJson <StructureDataRoot>(structuresText.text)
                       .structures;

            _structureData = data.ToDictionary(d => d.type, d => d);

            if (structures == null)
            {
                structures = FindObjectOfType <Structures>();
            }

            if (tiles == null)
            {
                tiles = FindObjectOfType <BuildingTiles>();
            }
        }