/// <summary> /// Set mapping from old V1.x atlas material to new v2.x tileset. /// </summary> /// <param name="oldAtlasMaterial">Old atlas material.</param> /// <param name="newTileset">New tileset.</param> public void SetMapping(Material oldAtlasMaterial, Rotorz.Tile.Tileset newTileset) { int oldIndex = oldAtlasMaterials.IndexOf(oldAtlasMaterial); if (oldIndex == -1) { oldAtlasMaterials.Add(oldAtlasMaterial); newTilesets.Add(newTileset); } else { newTilesets[oldIndex] = newTileset; } EditorUtility.SetDirty(this); }