public static void ResolveReferencedUnityEngineClassesFromMono(AssemblyDefinition[] assemblies, AssemblyDefinition unityEngine, RuntimeClassRegistry res)
{
if (res != null)
{
foreach (AssemblyDefinition definition in assemblies)
{
if (definition != unityEngine)
{
IEnumerator <TypeReference> enumerator = definition.MainModule.GetTypeReferences().GetEnumerator();
try
{
while (enumerator.MoveNext())
{
TypeReference current = enumerator.Current;
if (current.Namespace.StartsWith("UnityEngine"))
{
string name = current.Name;
res.AddMonoClass(name);
}
}
}
finally
{
if (enumerator == null)
{
}
enumerator.Dispose();
}
}
}
}
}