Skip to main content

CacheTransformIfEmptyAttribute

A class in Alta.Attributes, the global namespace.

Prefab-apply attribute for a Transform field: fills it with the component's own transform only when the field is empty.

Constructors​

MemberWhat it is
CacheTransformIfEmptyAttribute()Creates a CacheTransformIfEmptyAttribute with default values.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for this class. Not used.

Methods​

MemberWhat it is
override bool HandleApply(Component component, FieldInfo field, GameObject prefab)Sets the field to the component's transform if it's null. Returns true when it changed the field.