| | |
| | | [System.Serializable] |
| | | public class MapData |
| | | { |
| | | public const string MapEditorData_Suffix = "MapData_"; |
| | | |
| | | public int id; |
| | | public MapTrigger[] triggers; |
| | | public Dictionary<int, Evt> eventDict = new Dictionary<int, Evt>(); |
| | | public MapTrasfer[] transfers; |
| | | |
| | | public static MapData LoadFormFile(string fileName) |
| | | public static MapData LoadFormFile(int mapID) |
| | | { |
| | | string _path = null; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | _path = ResourcesPath.ResourcesOutPath + "Refdata/MapData/" + fileName + ".gd"; |
| | | #if UNITY_EDITOR |
| | | _path = ResourcesPath.ResourcesOutPath + "Refdata/ScriptableObject/MapData/" + mapID + ".gd"; |
| | | |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | _path = AssetVersionUtility.GetAssetFilePath(StringUtility.Contact("mapdata/", fileName, ".gd")); |
| | | _path = AssetVersionUtility.GetAssetFilePath(StringUtility.Contact("mapdata/", mapID, ".gd")); |
| | | } |
| | | MapData _mapData = null; |
| | | if (File.Exists(_path)) |