Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ApplyTo

Applies this preset to a target object.
Read time 1 minuteLast updated 5 days ago

Definition

ApplyTo(Object)

Applies this preset to a target object.
public bool ApplyTo(Object target)

Parameters

target

The object to update with the serialized values of the preset.

Returns

Type

Description

boolTrue 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
selectedPropertyPaths
.

ApplyTo(Object, string[])

Applies the values of selected properties of this preset to a target object.
public bool ApplyTo(Object target, string[] selectedPropertyPaths)

Parameters

target

The object to update with the serialized values of the preset.

selectedPropertyPaths

The property paths of the values to apply.

Returns

Type

Description

boolTrue 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
.