mirror of
https://github.com/LukeFZ/Il2CppInspectorRedux.git
synced 2026-03-22 00:18:18 +05:00
add support for metadata version v105 (6000.5.0a5)
This commit is contained in:
2421
Il2CppInspector.Common/Cpp/UnityHeaders/105-6000.5.0a5.h
vendored
Normal file
2421
Il2CppInspector.Common/Cpp/UnityHeaders/105-6000.5.0a5.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -97,7 +97,7 @@ namespace Il2CppInspector
|
||||
// Set object versioning for Bin2Object from metadata version
|
||||
Version = new StructVersion(Header.Version);
|
||||
|
||||
if (Version < MetadataVersions.V160 || Version > MetadataVersions.V1040) {
|
||||
if (Version < MetadataVersions.V160 || Version > MetadataVersions.V1050) {
|
||||
throw new InvalidOperationException($"The supplied metadata file is not of a supported version ({Header.Version}).");
|
||||
}
|
||||
|
||||
@@ -163,6 +163,12 @@ namespace Il2CppInspector
|
||||
+ $"_{PropertyIndex.TagPrefix}{propertyIndexSize}";
|
||||
}
|
||||
|
||||
if (Version >= MetadataVersions.V1050)
|
||||
{
|
||||
var methodIndexSize = GetIndexSize(Header.Methods.Count);
|
||||
fullTag += $"_{MethodIndex.TagPrefix}{methodIndexSize}";
|
||||
}
|
||||
|
||||
Version = new StructVersion(Version.Major, Version.Minor, fullTag);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace Il2CppInspector.Next.Metadata;
|
||||
|
||||
using StringIndex = int;
|
||||
using MethodIndex = int;
|
||||
using VersionedSerialization.Attributes;
|
||||
|
||||
[VersionedStruct]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
using StringIndex = int;
|
||||
using AssemblyIndex = int;
|
||||
using MethodIndex = int;
|
||||
using CustomAttributeIndex = int;
|
||||
using VersionedSerialization.Attributes;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ using VersionedSerialization.Attributes;
|
||||
namespace Il2CppInspector.Next.Metadata;
|
||||
|
||||
using StringIndex = int;
|
||||
using MethodIndex = int;
|
||||
|
||||
[VersionedStruct]
|
||||
public partial record struct Il2CppPropertyDefinition
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Il2CppInspector.Next.Metadata;
|
||||
|
||||
using StringIndex = int;
|
||||
using FieldIndex = int;
|
||||
using MethodIndex = int;
|
||||
using VTableIndex = int;
|
||||
|
||||
[VersionedStruct]
|
||||
|
||||
45
Il2CppInspector.Common/Next/Metadata/MethodIndex.cs
Normal file
45
Il2CppInspector.Common/Next/Metadata/MethodIndex.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using VersionedSerialization;
|
||||
|
||||
namespace Il2CppInspector.Next.Metadata;
|
||||
|
||||
public struct MethodIndex(int value) : IIndexType<MethodIndex>, IReadable, IEquatable<MethodIndex>
|
||||
{
|
||||
public const string TagPrefix = nameof(MethodIndex);
|
||||
|
||||
static string IIndexType<MethodIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<MethodIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
public static int Size(in StructVersion version = default, bool is32Bit = false)
|
||||
=> IIndexType<MethodIndex>.IndexSize(version, is32Bit);
|
||||
|
||||
public void Read<TReader>(ref TReader reader, in StructVersion version = default) where TReader : IReader, allows ref struct
|
||||
{
|
||||
_value = IIndexType<MethodIndex>.ReadIndex(ref reader, in version);
|
||||
}
|
||||
|
||||
#region Operators + ToString
|
||||
|
||||
public static implicit operator int(MethodIndex idx) => idx._value;
|
||||
public static implicit operator MethodIndex(int idx) => new(idx);
|
||||
|
||||
public static bool operator ==(MethodIndex left, MethodIndex right)
|
||||
=> left._value == right._value;
|
||||
|
||||
public static bool operator !=(MethodIndex left, MethodIndex right)
|
||||
=> !(left == right);
|
||||
|
||||
public readonly override bool Equals(object obj)
|
||||
=> obj is MethodIndex other && Equals(other);
|
||||
|
||||
public readonly bool Equals(MethodIndex other)
|
||||
=> this == other;
|
||||
|
||||
public readonly override int GetHashCode()
|
||||
=> HashCode.Combine(_value);
|
||||
|
||||
public readonly override string ToString() => _value.ToString();
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -44,4 +44,8 @@ public static class MetadataVersions
|
||||
public static readonly StructVersion V1040 = new(104);
|
||||
// NOTE: This version additionally uses tags to specify the size of InterfaceIndex, EventIndex, PropertyIndex, NestedTypeIndex,
|
||||
// alongside a new metadata section for Il2CppInlineArrayLength and a bitfield flag indicating an inline array.
|
||||
|
||||
// Unity 6000.5.0a5
|
||||
public static readonly StructVersion V1050 = new(105);
|
||||
// NOTE: This version additionally uses a tag to specify the size of MethodIndex.
|
||||
}
|
||||
@@ -8,7 +8,7 @@ This is a continuation of [Il2CppInspector, by djkaty](https://github.com/djkaty
|
||||
|
||||
### Redux only features
|
||||
|
||||
* Support for metadata version 29/29.1/31/35/38/39/104, with full reconstruction of custom attributes
|
||||
* Support for metadata version 29/29.1/31/35/38/39/104/105, with full reconstruction of custom attributes
|
||||
* Proper extraction of static array initializer contents with their correct length
|
||||
* Proper support for v27.2+ Il2CppType
|
||||
* Fixed support for v24.5
|
||||
@@ -770,7 +770,8 @@ Unity version | IL2CPP version | Support
|
||||
6000.3.0a2 | 35 | Working
|
||||
6000.3.0a5 | 38 | Working
|
||||
6000.3.0b1 | 39 | Working
|
||||
6000.5.0a3 | 104 | Working
|
||||
6000.5.0a3-6000.5.0a4 | 104 | Working
|
||||
6000.5.0a5 | 105 | Working
|
||||
|
||||
Please refer to the companion repository https://github.com/nneonneo/Il2CppVersions if you would like to track the changes between each IL2CPP release version.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user