Player Setup
This setup provides a comprehensive guide on migrating components, logic, weapons, animations, hitboxes, and visual effects from the default toolkit player to a custom 3D player model using the Boss AI Toolkit Player Setup Wizard in Unity.
1. Automated Player Migration (Player Setup Wizard)
Use the built-in wizard tool to quickly transfer components, scripts, hitboxes, and bone references from an existing template player to a new custom player model.
Step 1.1: Preparing the Model
- Place your new 3D player model into the scene hierarchy and name it
Player New - Align its position and rotation to match the original template player
- Apply the appropriate player material to the mesh
- Right-click
Player Newand create a child empty GameObject namedHit PointPosition it around the chest/torso area
Step 1.2: Running the Setup Wizard
- Navigate to Tools -> Boss AI Toolkit -> Player Setup
- Assign the fields as follows:
- Source Player: Drag the original template player GameObject
- Target Player: Drag
Player New - New Rig: Drag the rig transform of the new player
- New Skinned Mesh Renderer: Drag the Skinned Mesh Renderer of the new player
- Hit Point: Drag the newly created
Hit Pointtransform - Weapon Parent: Drag the Right Hand bone transform
- Shield Parent: Drag the Left Hand bone transform
- Add equipment entries:
- Weapon List: Add element and assign
Player Sword - Shield List: Add element and assign
Shield 2 - Click Apply Changes to Target Player
- Click Awesome when prompted
2. Equipment Transforms & Materials Alignment
After running the wizard, manually adjust equipment positions, scales, and materials to fit the new character mesh.
Steps
- Select the spawned sword object under the right hand:
- Copy the transform values (Position, Rotation, Scale) from the template weapon and paste them onto the new sword
- Assign the sword material
- Select the spawned shield object under the left hand:
- Copy and paste the transform values from the template shield
- Assign the shield material
- Add Navigation Cutout Avoidance:
- Add a Nav Mesh Modifier component to both the sword and shield GameObjects
- Set Mode to
Remove Object - NOTE: This prevents weapons from creating holes in the NavMesh during baking, which blocks Boss AI navigation
3. Animation Overrides & Animator Replacement
Replace standard animation clips (e.g., Idle, Walk, Attack) with custom animations using the Animator Clip Replacer.
Steps
- In the Project window, locate
Player Test Animator Controller - Duplicate it (
Ctrl + DorCmd + D) and rename the copy toPlayer New Animator Controller - Assign
Player New Animator Controllerto theAnimatorcomponent onPlayer New - Go to Tools -> Boss AI Toolkit -> Animator Clip Replacer
- Drag
Player New Animator Controllerinto the script field - Swap desired animation clips (e.g., replace
Idle 5withIdle 02) - Click Apply Animator Overrides
4. Player Controller & UI Reference Bindings
Rebind scene references in the Player Controller and UI Canvas to direct control to the new player entity.
Steps
- Select
Player Newand locate the Player Controller component - Update the following fields:
- Player Reference: Replace references pointing to the old player with
Player New - Hit Point: Assign
Player New/Hit Point - Set up the Shield Hit Point:
- Duplicate
Hit Point, parent it under the Shield GameObject, reset its transform, and position it on the front face of the shield - Assign this transform to Shield Hit Effect Spawn Point on the controller
- UI Canvas Update: Select the
Canvas 2Dobject in the hierarchy and re-assignPlayer Newto any player reference slots (e.g., Shield Button)
5. Melee Hitbox & Team Configuration
Set up manual hitboxes on weapons to accurately trigger and apply damage to enemy entities.
Steps
- Under
Player New -> Right Hand -> Sword, create an empty child GameObject namedHitbox - Add a Capsule Collider, adjust its size to cover the blade, and check Is Trigger
- Add the Hitbox script and configure as follows:
- Damage:
3 - Owner:
Player New - Compare Enemy: Checked
- Script Team Member: Drag
Team Memberscript fromPlayer New - Activation Mode:
Manual - Deactivate Hitbox On Hit: Checked (Prevents multi-hit damage on single swings)
- Deactivate Hitbox After Certain Time: Checked
- Hitbox Lifetime:
3seconds - On
Player New: - Drag the new
Hitboxinto the Hitbox Controller component attack with the Player - Set Team Member -> Team to
Team 1 - Set My Body Part To Target to
Hit Point
6. Weapon Slash VFX & Animation Events Setup
Configure directional slash particles and animation event triggers for combat actions, hitboxes, and footstep audio.
Step 6.1: Slash Spawn Point Setup
- Right-click
Player New-> Create Empty and name itSlash Spawn Point 1 - Position and rotate the point in front of the character (e.g., Position Y:
1.47, Rotation X:370) - Child a slash particle effect (e.g.,
Electro Slash) underSlash Spawn Point 1 - In the Slash Activation Manager on
Player New: - Assign
Slash Spawn Point 1to Slash Spawn Point - Set Slash X Scale to negative (e.g.,
-1) if flipping directions for left slashes - Assign the particle reference and set Activation Delay to
0.4seconds
Step 6.2: Animation Event Binding
Open Window -> Animation -> Animation:
- Slash Activation: On attack animation clips (e.g.,
Left Slash), add an event at frame 0 callingSlashActivationManager.ActivateParticlespassing the configuration name string - Hitbox Activation/Deactivation:
- Add an event at the swing start frame calling
HitboxController.ActivateHitbox - Add an event at the swing end frame calling
HitboxController.DeactivateHitbox - Footstep Audio: On locomotion clips (e.g.,
Walk,Run), add an event at contact frames callingUniversalSoundPlayer.PlayAudioActionwith parameter string"Footstep Sound"
7. Movement & Combat Parameter Reference
Configure fine-tuning parameters inside the Player Controller script:
| Parameter | Recommended Value | Description |
|---|---|---|
| Auto Rotate To Enemy | Checked |
Automatically rotates player toward target upon attacking |
| Auto Rotate Range | 3 meters |
Detection range threshold for auto-targeting rotation |
| Hit Animation Interval | 1 second |
Cooldown between hit-reaction stagger animations |
| Health Settings | 100 HP (2s Change Duration) |
Smooth lerping duration for health UI depletion |
| Slide To Enemy | Optional | Enables automatic closing distance slide toward enemy on attack |
8. Verification Checklist
Before testing combat in Play Mode, verify all setups against this checklist:
- [ ] NavMesh Modifiers: Sword and Shield have
Nav Mesh Modifierset toRemove Objectto prevent navigation holes - [ ] Team ID: Player set to
Team1; Enemy entities set toTeam2 - [ ] Hitbox Flags:
Deactivate Hitbox On HitandDeactivate Hitbox After Certain Timeenabled on weapon hitbox - [ ] Animation Events:
ActivateHitbox,DeactivateHitbox, andActivateParticlesevents are added on animation clips