public static void SetResPath(bool fullPath, string tileMapInfoPath, string tileMapInfoName, string itemInfoPath, string itemInfoName, string alphaTexPath, string alphaTexName, string terrainObjPath, string terrainObjName, string itemObjPath, string alphaTexObjPath) { m_TileMapGen.SetResPath(fullPath, tileMapInfoPath, tileMapInfoName, itemInfoPath, itemInfoName, alphaTexPath, alphaTexName, terrainObjPath, terrainObjName, itemObjPath, alphaTexObjPath); }
void Start() { #if UNITY_EDITOR var terrainInfo = AssetDatabase.LoadAssetAtPath <TerrainInfo>(string.Format("Assets/TileMap/TerrainInfo.asset")); #else var terrainInfo = new TerrainInfo(); #endif string tilemapInfoPath = "Assets/TileMap/MapInfo"; string tilemapInfoName = "MapInfo_{0}_{1}"; string itemInfoPath = "Assets/TileMap/ItemInfo"; string itemInfoName = "ItemInfo_{0}_{1}"; string alphaTexInfoPath = "Assets/TileMap/TerrainAlpha"; string alphaTexInfoName = "TerrainAlpha_{0}_{1}"; string tilemapObjPath = "Assets/TileMap/TileMapObj/Prefab/Terrain"; string tilemapObjName = "Terrain@{0}"; string itemObjPath = "Assets/TileMap/TileMapObj/Prefab/Item"; string alphaTexObjPath = "Assets/TileMap/TileMapObj/Prefab/TerrainAlpha"; gen.Init(terrainInfo, size_W, size_H, 8, 8, 2.7f, -2.9f); gen.SetResPath(false, tilemapInfoPath, tilemapInfoName, itemInfoPath, itemInfoName, alphaTexInfoPath, alphaTexInfoName, tilemapObjPath, tilemapObjName, itemObjPath, alphaTexObjPath); }
void Start() { #if UNITY_EDITOR var terrainInfo = AssetDatabase.LoadAssetAtPath <TerrainInfo>(string.Format("Assets/TileMap/TerrainInfo.asset")); #else var terrainInfo = new TerrainInfo(); #endif string tilemapInfoPath = "Assets/TileMap/MapInfo"; string tilemapInfoName = "MapInfo_{0}_{1}"; string itemInfoPath = "Assets/TileMap/ItemInfo"; string itemInfoName = "ItemInfo_{0}_{1}"; string alphaTexInfoPath = "Assets/TileMap/TerrainAlpha"; string alphaTexInfoName = "TerrainAlpha_{0}_{1}"; string tilemapObjPath = "Assets/TileMap/TileMapObj/Prefab/Terrain"; string tilemapObjName = "Terrain@{0}"; string itemObjPath = "Assets/TileMap/TileMapObj/Prefab/Item"; string alphaTexObjPath = "Assets/TileMap/TileMapObj/Prefab/TerrainAlpha"; gen.Init(terrainInfo, size_W, size_H, item_W, item_H, size_W / 2 - 1, size_H / 2 - 1); gen.SetResPath(false, tilemapInfoPath, tilemapInfoName, itemInfoPath, itemInfoName, alphaTexInfoPath, alphaTexInfoName, tilemapObjPath, tilemapObjName, itemObjPath, alphaTexObjPath); // gen.Init(terrainInfo, terrainInfo.MapSize.x, terrainInfo.MapSize.y, terrainInfo.SpiltMapSize.x, terrainInfo.SpiltMapSize.y, size, Vector2.zero); }