private static void CreateScriptTemplatesClassAttribute() { if (TextFileTemplateConverter.TryGetTemplatePath("82_Script Templates_Class Attribute_Attribute.cs", out string templatePath)) { TextFileTemplateConverter.Convert( "Attribute.cs", templatePath, s_scriptIcon ); } }
private static void CreateScriptTemplatesViewsView() { if (TextFileTemplateConverter.TryGetTemplatePath("81_Script Templates_Views_View_UserInterfaceView.cs", out string templatePath)) { TextFileTemplateConverter.Convert( "UserInterfaceView.cs", templatePath, s_scriptIcon ); } }
private static void CreateScriptTemplatesUtility() { if (TextFileTemplateConverter.TryGetTemplatePath("81_Script Templates_Utility_Utility.cs", out string templatePath)) { TextFileTemplateConverter.Convert( "Utility.cs", templatePath, s_scriptIcon ); } }
private static void CreateScriptTemplatesExtensions() { if (TextFileTemplateConverter.TryGetTemplatePath("81_Script Templates_Extensions_Extensions.cs", out string templatePath)) { TextFileTemplateConverter.Convert( "Extensions.cs", templatePath, s_scriptIcon ); } }
private static void CreateScriptTemplatesCommonCScript() { if (TextFileTemplateConverter.TryGetTemplatePath("80_Script Templates_Common C# Script_NewCommonBehaviourScript.cs", out string templatePath)) { TextFileTemplateConverter.Convert( "NewCommonBehaviourScript.cs", templatePath, s_scriptIcon ); } }
public override void Action(int instanceId, string pathName, string resourceFile) { Object script = TextFileTemplateConverter.Convert(pathName, resourceFile); ProjectWindowUtil.ShowCreatedAsset(script); }