public static void PromptUserForNameAuto() { string templateFilePath = ""; String targetPath = EditorUtils.GetDirectoryPathOfSelectedAsset(); if (targetPath.Contains("CYMCommon")) { templateFilePath = BaseConstMgr.Path_XTempCYMMonobehaviour; } else if (targetPath.Contains("_Func")) { templateFilePath = BaseConstMgr.Path_XTempMonobehaviour; } if (String.IsNullOrEmpty(targetPath)) { targetPath = "Assets"; } if (!File.Exists(templateFilePath)) { return; } String templateName = Path.GetFileNameWithoutExtension(templateFilePath); templateName = Regex.Replace(templateName, @"\W", ""); XenoTemplateUtilityWindow.ShowWindow(templateFilePath, templateName, targetPath); }
// // Public methods // //------------------------------------------------------------------------------ public static void PromptUserForName(String templateFilePath) { String targetPath = EditorUtils.GetDirectoryPathOfSelectedAsset(); if (String.IsNullOrEmpty(targetPath)) { targetPath = "Assets"; } if (!File.Exists(templateFilePath)) { return; } String templateName = Path.GetFileNameWithoutExtension(templateFilePath); templateName = Regex.Replace(templateName, @"\W", ""); XenoTemplateUtilityWindow.ShowWindow(templateFilePath, templateName, targetPath); }