Class ScooterRiderSetupEditor
Generates and replaces Humanoid rider rigs using only Editor-time authoring operations.
public static class ScooterRiderSetupEditor
Inheritance
Remarks
Vehicle adapters must supply persistent-in-scene targets before calling setup.
Methods
SetUp(ScooterRiderAuthoring)
Instantiates the source asset, builds its rig, and replaces the current character as one Undo operation.
public static void SetUp(ScooterRiderAuthoring setup)
Parameters
| Name | Type | Description |
|---|---|---|
setup | ScooterRiderAuthoring | Destination, asset, fit, controller and five same-scene targets outside the old model. |
Remarks
Preserves the old character's active state and remaps supported references in the destination scene. On failure, the Undo group restores the old model and references. Marks the scene dirty but does not save it. Prefab Mode uses the same path; persistent Project destinations and Play Mode are rejected.
Exceptions
InvalidOperationException — Input, bone mapping, reference remapping or graph validation fails.
ValidateModel(GameObject)
Validates a Project character asset without creating or modifying scene objects.
public static Animator ValidateModel(GameObject model)
Parameters
| Name | Type | Description |
|---|---|---|
model | GameObject |
Returns
Animator — The asset's unique valid Humanoid Animator; non-Humanoid accessory Animators are allowed.
Exceptions
InvalidOperationException — The input is missing, is a scene object, is not a prefab/model asset, lacks a unique Humanoid,
or already contains a RigBuilder. Required individual bones are checked during rig generation.
ValidateRig(ScooterRiderAuthoring)
Checks the generated three-layer rig structure and builds then clears its animation graph.
public static void ValidateRig(ScooterRiderAuthoring setup)
Parameters
| Name | Type | Description |
|---|---|---|
setup | ScooterRiderAuthoring |
Remarks
Validates bindings, not visual fit or the controller-driven pose; do not use on a live preview graph.
Exceptions
InvalidOperationException — The generated character or its constraint bindings are invalid.