Skip to main content

HasReferenceValueAttribute

A class in Alta.Attributes, the global namespace.

Prefab apply attribute for a bool field: keeps it set to whether another named field holds a non-null object.

Constructors​

MemberWhat it is
HasReferenceValueAttribute(string targetField)Creates a HasReferenceValueAttribute from targetField.

Fields​

2 private and internal fields
MemberWhat it is
private static readonly BindingFlags flagsBinding flags used to find the target field (any access, instance or static, including base classes).
private string targetFieldName of the field to check.

Methods​

MemberWhat it is
override bool HandleApply(Component component, FieldInfo field, GameObject prefab)Sets the bool field to whether the target field is non-null and returns true if that changed it.