Quick Start
This guide walks you from zero to a working companion in your scene. You need a GC2 Character-based player and a companion prefab (also with a GC2 Character).
Scene Setup
Two components are required before companions can be summoned:
1. Add CompanionManager
- Create an empty GameObject (name it "CompanionManager")
- Add Component →
CompanionManager - Mark it DontDestroyOnLoad if your game has multiple scenes
Tools → Companion System → Settings.2. Add CompanionOwnerAdapter to Player
- Select your Player GameObject
- Add Component →
CompanionOwnerAdapter
This bridges your GC2 Character to CPS's owner interface. CPS will also add it automatically when you use the Summon instruction with a player target.
Scene Hierarchy (minimum setup):
├── CompanionManager ← add CompanionManager component
│ └── CompanionRemember ← (optional) add for save/load
└── Player ← your GC2 Character
└── CompanionOwnerAdapter ← add this componentCreate a CompanionDefinition
A CompanionDefinition is the blueprint for a companion type. Think of it as the "species sheet" — it defines what the companion is and how it behaves.
- In the Project window, right-click your desired folder
- Select
Create → Companion System → Companion Definition - Name it descriptively (e.g., "Dog" or "Warrior_Companion")
- Assign your companion prefab in the Prefab field
CompanionDefinition: "MyCompanion"
├── Display Name: "Buddy"
├── Description: "A loyal follower"
├── Category: Pet
├── Icon: (your sprite)
├── Prefab: MyCompanion_Prefab ← must have GC2 Character
├── Follow Profile: MyFollowProfile
├── Idle Behavior: (optional)
├── Personality: (optional)
├── Reaction Profile: (optional)
└── Command Set: (optional)Set Up a FollowProfile
A FollowProfile controls how the companion follows — distances, speeds, formation behavior. You can set a project-wide default or assign per-companion overrides.
- Create via
Create → Companion System → Follow Profile - Tune the distances for your game's scale:
| Property | Good Starting Value | What It Does |
|---|---|---|
| Inner Radius | 2m | Stop distance from owner |
| Outer Radius | 8m | Distance before switching to run speed |
| Teleport Radius | 25m | Distance before teleporting behind owner |
| Walk Speed | 2.5 | Speed when close to owner |
| Run Speed | 5.5 | Speed when far from owner |
Assign the profile to your CompanionDefinition, or set it as the project default in Tools → Companion System → Settings.
Summon Your First Companion
With the scene set up and your Definition ready, summon the companion via GC2:
Trigger: On Start
└── Instructions:
└── Summon Companion
├── Definition: MyCompanion
├── Spawn Position: (player position)
└── Owner: PlayerWhat Happens on Summon
- Prefab is instantiated at the spawn position
- CompanionBrain is initialized with the Definition's profiles
- Companion begins following the owner immediately
- OnCompanionSummoned event fires
Offset from Owner in the spawn position to avoid overlapping with the player character.Validation Checklist
Before testing, verify:
Tools → Companion System → Settingsto see summon, recall, and state change events in the Console.