Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump AssetRipper.Primitives #244

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cpp2IL.Core.Tests/Cpp2IlApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class Cpp2IlApiTests
public void UnityVersionIsCorrectlyDeterminedFromGlobalGameManagers()
{
var version = Cpp2IlApi.DetermineUnityVersion(null, Paths.SimpleGame.DataDirectory);
Assert.That(version.IsEqual(2019, 4, 34));
Assert.That(version.Equals(2019, 4, 34));
}
}
2 changes: 1 addition & 1 deletion LibCpp2IL/LibCpp2IL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AssetRipper.Primitives" Version="2.0.0" />
<PackageReference Include="AssetRipper.Primitives" Version="2.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
Expand Down
22 changes: 11 additions & 11 deletions LibCpp2IL/Metadata/Il2CppMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,37 +76,37 @@ public class Il2CppMetadata : ClassReadingBinaryReader
float actualVersion;
if (version == 27)
{
if (unityVersion.IsGreaterEqual(2021, 1))
if (unityVersion.GreaterThanOrEquals(2021, 1))
actualVersion = 27.2f; //2021.1 and up is v27.2, which just changes Il2CppType to have one new bit
else if (unityVersion.IsGreaterEqual(2020, 2, 4))
else if (unityVersion.GreaterThanOrEquals(2020, 2, 4))
actualVersion = 27.1f; //2020.2.4 and above is v27.1
else
actualVersion = version; //2020.2 and above is v27
}
else if (version == 24)
{
if (unityVersion.IsGreaterEqual(2020, 1, 11))
if (unityVersion.GreaterThanOrEquals(2020, 1, 11))
actualVersion = 24.4f; //2020.1.11-17 were released prior to 2019.4.21, so are still on 24.4
else if (unityVersion.IsGreaterEqual(2020))
else if (unityVersion.GreaterThanOrEquals(2020))
actualVersion = 24.3f; //2020.1.0-10 were released prior to to 2019.4.15, so are still on 24.3
else if (unityVersion.IsGreaterEqual(2019, 4, 21))
else if (unityVersion.GreaterThanOrEquals(2019, 4, 21))
actualVersion = 24.5f; //2019.4.21 introduces v24.5
else if (unityVersion.IsGreaterEqual(2019, 4, 15))
else if (unityVersion.GreaterThanOrEquals(2019, 4, 15))
actualVersion = 24.4f; //2019.4.15 introduces v24.4
else if (unityVersion.IsGreaterEqual(2019, 3, 7))
else if (unityVersion.GreaterThanOrEquals(2019, 3, 7))
actualVersion = 24.3f; //2019.3.7 introduces v24.3
else if (unityVersion.IsGreaterEqual(2019))
else if (unityVersion.GreaterThanOrEquals(2019))
actualVersion = 24.2f; //2019.1.0 introduces v24.2
else if (unityVersion.IsGreaterEqual(2018, 4, 34))
else if (unityVersion.GreaterThanOrEquals(2018, 4, 34))
actualVersion = 24.15f; //2018.4.34 made a tiny little change which just removes HashValueIndex from AssemblyNameDefinition
else if (unityVersion.IsGreaterEqual(2018, 3))
else if (unityVersion.GreaterThanOrEquals(2018, 3))
actualVersion = 24.1f; //2018.3.0 introduces v24.1
else
actualVersion = version; //2017.1.0 was the first v24 version
}
else if (version == 29)
{
if (unityVersion.IsGreaterEqual(2022, 1, 0, UnityVersionType.Beta, 7))
if (unityVersion.GreaterThanOrEquals(2022, 1, 0, UnityVersionType.Beta, 7))
actualVersion = 29.1f; //2022.1.0b7 introduces v29.1 which adds two new pointers to codereg
else
actualVersion = 29; //2021.3.0 introduces v29
Expand Down
Loading