Ejemplo n.º 1
0
 private string GetPrefabPath()
 {
     return("Assets/Freespace Prefabs/" + ImportUtil.GetShipClassFromPath(originalFilePath) + "/" + modelName +
            ".prefab");
 }
Ejemplo n.º 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>();
        }