From 720dd6c66554e2062f32e02d09ed82c5ab2eb7e7 Mon Sep 17 00:00:00 2001 From: ds5678 <49847914+ds5678@users.noreply.github.com> Date: Sat, 19 Oct 2024 12:27:23 -0700 Subject: [PATCH] Add Il2CppFieldDefinition::DeclaringType * Convenience * Discoverability * Debugging --- LibCpp2IL/Metadata/Il2CppFieldDefinition.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LibCpp2IL/Metadata/Il2CppFieldDefinition.cs b/LibCpp2IL/Metadata/Il2CppFieldDefinition.cs index 3789a440..87d353e5 100644 --- a/LibCpp2IL/Metadata/Il2CppFieldDefinition.cs +++ b/LibCpp2IL/Metadata/Il2CppFieldDefinition.cs @@ -20,6 +20,8 @@ public class Il2CppFieldDefinition : ReadableClass public Il2CppFieldDefaultValue? DefaultValue => LibCpp2IlMain.TheMetadata?.GetFieldDefaultValue(this); + public Il2CppTypeDefinition DeclaringType => LibCpp2IlReflection.GetDeclaringTypeFromField(this); + public override string? ToString() { if (LibCpp2IlMain.TheMetadata == null)