diff --git a/IPA.Loader/Utilities/ReflectionUtil.cs b/IPA.Loader/Utilities/ReflectionUtil.cs
index 6f0a0195..9dc16e6a 100644
--- a/IPA.Loader/Utilities/ReflectionUtil.cs
+++ b/IPA.Loader/Utilities/ReflectionUtil.cs
@@ -130,6 +130,19 @@ namespace IPA.Utilities
return copy;
}
+ ///
+ /// Converts the property name to the one of the compiler-generated backing field.
+ /// This can be used for the field-based reflection when you want to set the value of a get-only property
+ ///
+ /// Name of the property
+ /// Name of the backing field
+ ///
+ /// Only works for properties with compiler-generated backing fields.
+ /// This is only a simple method and doesn't have any guarantees to work 100% of the time across different compilers/runtimes.
+ /// See this link for more info.
+ ///
+ public static string ToCompilerGeneratedBackingField(string propertyName) => $"<{propertyName}>k__BackingField";
+
private static void CopyForType(Type type, Component source, Component destination)
{
FieldInfo[] myObjectFields = type.GetFields(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);