File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Il2CppInterop.Runtime.Attributes;
66/// This attribute indicates that the target should not be exposed to IL2CPP in injected classes
77/// </summary>
88[ AttributeUsage ( AttributeTargets . Method | AttributeTargets . Constructor | AttributeTargets . Property |
9- AttributeTargets . Event ) ]
9+ AttributeTargets . Event | AttributeTargets . Field ) ]
1010public class HideFromIl2CppAttribute : Attribute
1111{
1212}
Original file line number Diff line number Diff line change @@ -533,6 +533,8 @@ private static bool IsTypeSupported(Type type)
533533
534534 private static bool IsFieldEligible ( FieldInfo field )
535535 {
536+ if ( field . CustomAttributes . Any ( it => typeof ( HideFromIl2CppAttribute ) . IsAssignableFrom ( it . AttributeType ) ) )
537+ return false ;
536538 if ( field . DeclaringType . IsValueType )
537539 return IsTypeSupported ( field . FieldType ) ;
538540 if ( ! field . FieldType . IsGenericType ) return field . FieldType == typeof ( Il2CppStringField ) ;
You can’t perform that action at this time.
0 commit comments