ApplyTo
Applies this preset to a target object.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Presets
- Assembly: UnityEditor.CoreModule
ApplyTo(Object)
Applies this preset to a target object.
public bool ApplyTo(Object target)
Parameters
The object to update with the serialized values of the preset.
Returns
Type | Description |
|---|---|
| bool | True if the preset updated the target. Otherwise, false. |
Remarks
To check whether the preset can apply to a target, use Preset.CanBeAppliedTo. To apply only some properties, use the overload that takes .
selectedPropertyPathsApplyTo(Object, string[])
Applies the values of selected properties of this preset to a target object.
public bool ApplyTo(Object target, string[] selectedPropertyPaths)
Parameters
Returns
Type | Description |
|---|---|
| bool | True if the preset updated the target. Otherwise, false. |
Remarks
To check whether the preset can apply to a target, use Preset.CanBeAppliedTo. The method applies only the properties in .
selectedPropertyPaths