diff --git a/Editor/ContextMenu/DoCreateTitleOwnAssembly.cs b/Editor/ContextMenu/DoCreateTitleOwnAssembly.cs index a53aa98..891e9f6 100644 --- a/Editor/ContextMenu/DoCreateTitleOwnAssembly.cs +++ b/Editor/ContextMenu/DoCreateTitleOwnAssembly.cs @@ -38,6 +38,9 @@ private static void CreateAssemblyDefinitionFile(string pathName) private static void CreateScriptAssetWithContent(string path, string content) { +#if UNITY_6000_0_OR_NEWER + ProjectWindowUtil.CreateScriptAssetWithContent(path, content); +#else var projectWindowUtilType = typeof(ProjectWindowUtil); var createScriptAssetWithContentMethod = projectWindowUtilType.GetMethod("CreateScriptAssetWithContent", BindingFlags.Static | BindingFlags.NonPublic); @@ -48,6 +51,7 @@ private static void CreateScriptAssetWithContent(string path, string content) } createScriptAssetWithContentMethod.Invoke(null, new object[] { path, content }); +#endif } } }