Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit 869f387

Browse files
author
DaZombieKiller
committed
* Always copy core assembly to managed folder
* The module split happened in Unity 2017.2, not 2017.1
1 parent 83c274f commit 869f387

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

PluginManager.Setup/Program.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ static void Main()
2020

2121
Version version = GetUnityVersion();
2222

23-
// as of Unity 2017, the UnityEngine assembly has been split into multiple assemblies
23+
// as of Unity 2017.2, the UnityEngine assembly has been split into multiple assemblies
2424
// the assembly containing the GameObject class is UnityEngine.CoreModule
25-
string coreName = version.Major < 2017 ? "UnityEngine" : "UnityEngine.CoreModule";
25+
string coreName = version.Major < 2017 || (version.Major == 2017 && version.Minor == 1)
26+
? "UnityEngine"
27+
: "UnityEngine.CoreModule";
28+
2629
string corePath = PathDiscovery.GetAssemblyPath(resolver, coreName);
2730
byte[] coreData = File.ReadAllBytes(corePath);
2831

@@ -50,9 +53,8 @@ static void Main()
5053

5154
unityCore.Write(corePath);
5255

53-
// pre-2017 versions of Unity need PluginManager.Core.dll in the Managed directory
54-
if (version.Major < 2017)
55-
File.Copy(CoreLibrary, Path.Combine(managedPath, CoreLibrary), true);
56+
// We need to copy PluginManager.Core.dll into the Managed directory
57+
File.Copy(CoreLibrary, Path.Combine(managedPath, CoreLibrary), true);
5658

5759
Console.WriteLine("UPM installed.");
5860
}

0 commit comments

Comments
 (0)