UnityEditor.RuntimeClassRegistry.IsDLLUsed C# (CSharp) Method

IsDLLUsed() public method

public IsDLLUsed ( string dll ) : bool
dll string
return bool
        public bool IsDLLUsed(string dll)
        {
            return ((this.m_UsedTypesPerUserAssembly == null) || ((Array.IndexOf<string>(CodeStrippingUtils.UserAssemblies, dll) != -1) || this.m_UsedTypesPerUserAssembly.ContainsKey(dll)));
        }

Usage Example

示例#1
0
        // this logic produces similar list of assemblies that IL2CPP will convert (it differs in the way it collects winmd files)
        public static IEnumerable <AssemblyDefinition> CollectAllAssemblies(string librariesFolder, RuntimeClassRegistry usedClasses)
        {
            var resolver = new DefaultAssemblyResolver();

            resolver.RemoveSearchDirectory(".");
            resolver.RemoveSearchDirectory("bin");
            resolver.AddSearchDirectory(librariesFolder);

            var usedDlls = usedClasses.GetUserAssemblies().Where(s => usedClasses.IsDLLUsed(s)).Select(file => AssemblyNameReference.Parse(Path.GetFileNameWithoutExtension(file)));

            return(CollectAssembliesRecursive(usedDlls.Select(dll => ResolveAssemblyReference(resolver, dll)).Where(a => a != null)));
        }
All Usage Examples Of UnityEditor.RuntimeClassRegistry::IsDLLUsed