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.
- Listed in Other Alta assemblies
- Inherits or implements
PrefabApplyAttribute
Constructors
| Member | What it is |
|---|---|
CacheTransformIfEmptyAttribute() | Creates a CacheTransformIfEmptyAttribute with default values. |
Fields
1 private and internal field
Methods
| Member | What 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. |