Follower
Make an object follow another object or player.
Introduction
Follower makes an object chase a player, another object, or anything carrying a chosen tag. With path finding on, it can walk around walls instead of getting stuck on them, as long as a NavMesh has been generated in World Settings. The Follower component panel in the Uni editor Image The Follower component panel in the Object editor. caption
How to Access
Select an object, open the Properties Panel, then press the Add Component button at the bottom and pick Follower. The component stacks onto the object as a new accordion of properties. How to Access - Add Component in the Properties Panel
Another Way to Access
Shortcut: open the Asset Panel, go to the Device tab, Basic category, and click the Follower block. The editor spawns a cube with Follower already attached, ready to adjust. How to Access - the Follower block in Asset Panel > Device > Basic
Properties
Target Mode Enum What to chase: the nearest player character, a specific object, or the nearest object with a matching tag. Follow Mode Guardian stays around its home area and never wanders far. Pet sticks to the target and finds a new one if the current one disappears. Path Finding Bool Enables AI route planning so the follower avoids walls. Both the target and the follower must sit inside the generated NavMesh. Max Distance Float Pet mode only. If the pet falls very far behind for five seconds, it teleports behind the target. Vision Radius How far the follower can sense its target. Vision Angle How wide its field of view is while sensing. X-Ray Lets the follower keep seeing its target even through walls. Move Speed How fast the follower runs. Turn Speed How quickly it changes direction while running. Gaurding Radius Guardian mode only. Outside this home radius the object gives up the chase and walks back to its start. Stopping Distance The safe gap. The follower stops closing in once it is nearer than this. Property Type Description Every property on the Follower component.
Events
When Following Starts Fires when the follower begins chasing a target. The parameter is the target being followed, and it is the character when chasing a player. Object When Reaching Target Fires once the distance to the target drops below the stopping distance. When Target Lost Fires when the target gets away. In Guardian mode this also fires when the object leaves its guarding radius. Event Description Parameter Every event on the Follower component. Each event links to its full guide, where its parameters and example live.
Commands
Follower has no commands.
Example
A pet follows the player around. The same setup can be used for companions, drones, and other objects that need to follow a target. Follower - simple example