Пример #1
0
 internal static string GetAssemblyDefinitionFilePathFromScriptPath(EditorCompilation editorCompilation, string sourceFilePath)
 {
     try
     {
         var customScriptAssembly = editorCompilation.FindCustomScriptAssemblyFromScriptPath(sourceFilePath);
         return(customScriptAssembly != null ? customScriptAssembly.FilePath : null);
     }
     catch (Exception)
     {
         return(null);
     }
 }
 internal static string GetAssemblyRootNamespaceFromScriptPath(EditorCompilation editorCompilation, string projectRootNamespace, string sourceFilePath)
 {
     try
     {
         var csa = editorCompilation.FindCustomScriptAssemblyFromScriptPath(sourceFilePath);
         return(csa != null ? (csa.RootNamespace ?? projectRootNamespace) : projectRootNamespace);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Пример #3
0
        internal static string GetAssemblyDefinitionFilePathFromScriptPath(EditorCompilation editorCompilation, string sourceFilePath)
        {
            string result;

            try
            {
                CustomScriptAssembly customScriptAssembly = editorCompilation.FindCustomScriptAssemblyFromScriptPath(sourceFilePath);
                result = ((customScriptAssembly == null) ? null : customScriptAssembly.FilePath);
            }
            catch (Exception)
            {
                result = null;
            }
            return(result);
        }