5 minutes
The robot from last lesson stands in the arena. It loops its idle clip and casts a shadow. It looks right, but it does nothing. Walk up to its face and it does not react. Shoot it and it does not flinch. It has a body and an animation, but no senses and no stakes. It cannot tell that you are there. It cannot be brought down. This lesson gives it both. These are the two things that turn a prop into an enemy.

Add LineOfSight and Health to the enemy template
You keep the enemy template from last lesson and add two components. LineOfSight lets it see the player. Health lets two bullets bring it down:
LineOfSight brings a new System with it. So it needs the same step from Lesson 5. Add one bare marker stub on World, at the top level. Put it beside the Enemy, Mesh, and SkeletonAnimator stubs that are already there:
Without the stub, the pooled robots cannot see. The component is on them, but SceneLoader never creates LineOfSightSystem to run the check. Health needs no stub. Its system already came in with the player. The player has carried Health at the top level since Lesson 2.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.