You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to install the R3 package via NuGetforUnity.
It fails to install all transitive dependencies, specifically, System.Runtime.Compilerservices.Unsafe. On the console, I see the message:
Is package 'System.Runtime.CompilerServices.Unsafe' already imported? True
Package System.Runtime.CompilerServices.Unsafe.6.0.0 is already imported in engine, skipping install.
However, then Unity fails to compile saying that assembly is missing. From some quick experimentation:
public class Assemblies
{
// menu item to print all assemblies
[UnityEditor.MenuItem("Tools/Print Assemblies")]
public static void PrintAssemblies()
{
var assemblies = CompilationPipeline.GetAssemblies(AssembliesType.Editor);
foreach (var assembly in assemblies)
{
Debug.Log(assembly.name);
Debug.Log(assembly.outputPath);
}
}
}
Is it possible that Nuget is mistaken? Is there any other way I can truly verify whether the dependency is already present, and if so where it is?
I don't see System.Runtime.CompilerServices.Unsafe anywhere in the output.
The text was updated successfully, but these errors were encountered:
tattyd
changed the title
"(assemble) is already imported in engine" - but I don't think it is?
"(assembly) is already imported in engine" - but I don't think it is?
Mar 4, 2024
Hi @tattyd
thanks for the issue.
Especially in Unity versions > 2023 Unity has different assemblies that are available in Editor / Player.
NuGet for unity uses the following to determine the assemblies:
If you try to use the importer NuGet package in a Editor assembly you probably can fix it by changing the Editor Assembly Compatibility Level in the Unity settings so it matches the one used in runtime.
Description
Hi there,
I'm trying to install the R3 package via NuGetforUnity.
It fails to install all transitive dependencies, specifically, System.Runtime.Compilerservices.Unsafe. On the console, I see the message:
However, then Unity fails to compile saying that assembly is missing. From some quick experimentation:
Is it possible that Nuget is mistaken? Is there any other way I can truly verify whether the dependency is already present, and if so where it is?
I don't see System.Runtime.CompilerServices.Unsafe anywhere in the output.
The text was updated successfully, but these errors were encountered: