public static void CreateTextureArray() { var path = Application.dataPath; var blendFile = "/Models/Template.kra"; var fullPath = path + blendFile; if (!File.Exists(fullPath)) { Debug.LogError("Krita File not found, creating new File not possible aborting"); return; } var targetObjectPath = AssetCreator.GetAssetPath(Selection.activeObject); var targetPath = targetObjectPath + "/NewKrita.kra"; File.Copy(fullPath, targetPath); AssetDatabase.Refresh(); EditorUtility.SetDirty(Selection.activeObject); }
public static void CreateTextureArray() { var path = Application.dataPath; var svgFile = "/Models/CloneInkscapeTemplate.svg"; var fullPath = path + svgFile; if (!File.Exists(fullPath)) { Debug.LogError("Template Inkscape File not found, creating new File not possible aborting, looking for /Models/CloneInkscapeTemplate.svg"); return; } var targetObjectPath = AssetCreator.GetAssetPath(Selection.activeObject); var targetPath = targetObjectPath + "/InkscapeTemplate.svg"; File.Copy(fullPath, targetPath); AssetDatabase.Refresh(); EditorUtility.SetDirty(Selection.activeObject); }