Exemple #1
0
        private string GetImportPath()
        {
            string rootPath  = Path.Combine(Application.dataPath, "Freespace Assets");
            string classPath = Path.Combine(rootPath, ImportUtil.GetShipClassFromPath(originalFilePath));

            return(Path.Combine(classPath, modelName));
        }
Exemple #2
0
        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>();
        }
Exemple #3
0
 private string GetPrefabPath()
 {
     return("Assets/Freespace Prefabs/" + ImportUtil.GetShipClassFromPath(originalFilePath) + "/" + modelName +
            ".prefab");
 }