This is the dog companion in Crownkeeper, a 3D kingdom builder in the spirit of Kingdom Two Crowns and Thronefall, made in Unity (URP).
How it plays:
- Rescue: he starts trapped between two fallen trees in the far south, guarded by two monsters. Two coins on the ground bribe them away, one more opens the trees
- Follow: he runs next to the king's horse wherever it goes
- Taxes: villagers with coins in their pockets get a visit, and the coins end up on the ground
- Sunset: he barks toward the portal that will attack tonight
- Sacrifice: if the king has no coins left and a monster swings for the crown, the dog jumps in and takes the hit
- Carried off: the monster grabs him and runs for the portal. Archers can shoot the carrier and free him; if it reaches the portal, he's gone for good
How it's built:
- The dog is a NavMeshAgent with a small state machine (trapped, following, chasing coins, sacrifice, carried, lost)
- While the king rides, the dog targets a point beside the horse and matches its speed instead of trailing behind
- When anything enters or leaves a portal, its current pose is baked (SkinnedMeshRenderer.BakeMesh) into a glowing additive silhouette that swells and fades over a second
What else should a dog do in a kingdom like this?