private string GetImportPath() { string rootPath = Path.Combine(Application.dataPath, "Freespace Assets"); string classPath = Path.Combine(rootPath, ImportUtil.GetShipClassFromPath(originalFilePath)); return(Path.Combine(classPath, modelName)); }
public Importer(string originalFilePath, string progressTitle = "Importing") { this.originalFilePath = originalFilePath; this.progressTitle = progressTitle; modelName = ImportUtil.CultureInfo.TextInfo.ToTitleCase(Path.GetFileNameWithoutExtension(originalFilePath) .ToLower()); string importPath = GetImportPath(); texturePath = Path.Combine(importPath, "Textures"); materialPath = Path.Combine(importPath, "Materials"); meshPath = Path.Combine(importPath, "Meshes"); AssetRootPath = "Assets/Freespace Assets/" + ImportUtil.GetShipClassFromPath(originalFilePath) + "/" + modelName; PrefabRootPath = ImportUtil.MakePath(new[] { Application.dataPath, "Freespace Prefabs", ImportUtil.GetShipClassFromPath(originalFilePath) }); Directory.CreateDirectory(PrefabRootPath); materialMap = new Dictionary <int, Material>(); processedSubObjects = new HashSet <SubObject>(); }
private string GetPrefabPath() { return("Assets/Freespace Prefabs/" + ImportUtil.GetShipClassFromPath(originalFilePath) + "/" + modelName + ".prefab"); }