using System; using System.Collections.Generic; using System.Reflection; #if UNITY_6000_5_OR_NEWER using UnityEngine.Assemblies; #endif namespace UnityEngine.AddressableAssets.Utility { /// /// Utility class for working with assemblies in a CoreCLR-compatible way. /// public static class AssemblyUtility { /// /// Gets all loaded assemblies. Uses CoreCLR-compatible API on Unity 6000.5 or newer. /// /// Array of all loaded assemblies. public static IEnumerable GetAssemblies() { #if UNITY_6000_5_OR_NEWER return CurrentAssemblies.GetLoadedAssemblies(); #else return AppDomain.CurrentDomain.GetAssemblies(); #endif } } }