static Material CreateNFAPairFromConfig(string currentFolder, NeoFurConfig config, NeoFurAsset nfa) { Material mat = null; string materialFolder = currentFolder + "/" + MaterialsFolderName; if (!AssetDatabase.IsValidFolder(materialFolder)) { materialFolder = AssetDatabase.CreateFolder(currentFolder, MaterialsFolderName); } // get material profile directory MaterialUtils.MaterialQuality qualityProfile = GetShaderTypeFromConfig(config); string materialProfileFolder = materialFolder + "/" + (m_targetFolderName); if (!AssetDatabase.IsValidFolder(materialProfileFolder)) { materialProfileFolder = AssetDatabase.CreateFolder(materialFolder, m_targetFolderName); } string materialSubName = config.Name.Substring(config.Name.LastIndexOf("_") + 1); string materialName = "MAT_NeoFur_" + materialSubName; Log("=======================================\nCreating mat + nfa: " + materialName); string path = materialProfileFolder + "/" + materialName /* + "_" + config.ShaderType*/ + ".mat"; // apply settings based on config file mat = MaterialUtils.CreateMaterialAsset(path, qualityProfile); ApplyMaterialProperties(mat, config); ApplyComponentProperties(mat, config, nfa); Log("======================================="); return(mat); }