//Danger danger: this method is used by BurstAotCompiler.cs
        internal static ScriptAssembly[] GetScriptAssemblies(IEditorCompilation editorCompilation, EditorScriptCompilationOptions options, string[] extraScriptingDefines = null)
        {
            var group             = EditorUserBuildSettings.activeBuildTargetGroup;
            var target            = EditorUserBuildSettings.activeBuildTarget;
            var buildingForEditor = (options & EditorScriptCompilationOptions.BuildingForEditor) != 0;

            var unityAssemblies       = InternalEditorUtility.GetUnityAssemblies(buildingForEditor, @group, target);
            var precompiledAssemblies = editorCompilation.PrecompiledAssemblyProvider.GetPrecompiledAssembliesDictionary(options, @group, target, extraScriptingDefines);

            return(editorCompilation.GetAllScriptAssemblies(options, unityAssemblies, precompiledAssemblies, null));
        }
        internal static ScriptAssembly[] GetScriptAssemblies(IEditorCompilation editorCompilation, AssembliesType assembliesType, string[] extraScriptingDefines = null)
        {
            var options = EditorCompilationInterface.GetAdditionalEditorScriptCompilationOptions(assembliesType);

            return(GetScriptAssemblies(editorCompilation, options, extraScriptingDefines));
        }