Skip to main content

PrefabApplyAttribute

An abstract class in Alta.Attributes, the global namespace.

Base for field attributes that fill in or check a field when a prefab is applied in the editor, such as GetComponent and CacheTransform.

Constructors​

MemberWhat it is
protected PrefabApplyAttribute()Creates a PrefabApplyAttribute with default values.

Methods​

MemberWhat it is
abstract bool HandleApply(Component component, FieldInfo field, GameObject prefab)Sets up or checks the field on the component. Returns whether anything changed, probably so the prefab is marked dirty.