From e454c5506f49cc0f75b6f0a63cbde2602a54e84d Mon Sep 17 00:00:00 2001 From: Jeremy Pritts <49847914+ds5678@users.noreply.github.com> Date: Sat, 19 Oct 2024 12:29:49 -0700 Subject: [PATCH] Add Il2CppFieldDefinition::DeclaringType (#348) --- 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)