Last active
January 18, 2024 10:00
Revisions
-
johnsoncodehk revised this gist
Jan 16, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ static void CreateScriptAsset(string templatePath, string destName) { #if UNITY_2019_1_OR_NEWER UnityEditor.ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, destName); #else typeof(UnityEditor.ProjectWindowUtil) .GetMethod("CreateScriptAsset", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) -
johnsoncodehk revised this gist
Jan 16, 2020 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ // Not support of 2019.1.0f1 static void CreateScriptAsset(string templatePath, string destName) { #if UNITY_2019_1_OR_NEWER ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, destName); #else typeof(UnityEditor.ProjectWindowUtil) .GetMethod("CreateScriptAsset", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) .Invoke(null, new object[] { templatePath, destName }); #endif } -
johnsoncodehk revised this gist
Jun 15, 2018 . No changes.There are no files selected for viewing
-
johnsoncodehk created this gist
Jun 15, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ static void CreateScriptAsset(string templatePath, string destName) { typeof(UnityEditor.ProjectWindowUtil) .GetMethod("CreateScriptAsset", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) .Invoke(null, new object[] { templatePath, destName }); }