public static bool HasGhostFieldAttribute(Mono.Cecil.TypeReference parentType, Mono.Cecil.FieldDefinition componentField) { if (!GhostAuthoringComponentEditor.GhostDefaultOverrides.TryGetValue(parentType.FullName.Replace('/', '+'), out var newComponent)) { return(componentField.HasAttribute <GhostFieldAttribute>()); } else { return(newComponent.fields.Any(f => f.name == componentField.Name)); } }
public static bool IsGhostField(this Mono.Cecil.FieldDefinition fieldDefinition) { return(fieldDefinition.HasAttribute <GhostFieldAttribute>()); }