mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: #2579 "No writer found" error when running Mirror tests in Unity 2020.3 Editor. fixes the first bug in editor, but maybe not the runtime bug? or maybe it does.
This commit is contained in:
parent
b7c63c3067
commit
417642475a
@ -127,8 +127,10 @@ static bool LoadDeclaredReaders(AssemblyDefinition currentAssembly, TypeDefiniti
|
||||
|
||||
static bool IsEditorAssembly(AssemblyDefinition currentAssembly)
|
||||
{
|
||||
// we want to add the [InitializeOnLoad] attribute if it's available
|
||||
// -> usually either 'UnityEditor' or 'UnityEditor.CoreModule'
|
||||
return currentAssembly.MainModule.AssemblyReferences.Any(assemblyReference =>
|
||||
assemblyReference.Name == nameof(UnityEditor)
|
||||
assemblyReference.Name.StartsWith(nameof(UnityEditor))
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user