The Waypoint component
Add it to anything players should find. Everything except the icon is optional.
Icon, name and colour #
| Setting | What it does |
|---|---|
| Icon | Pick from 20 built-in icons (objective, pin, flag, star, home, skull, chest, key, coin, talk...), or Custom for your own sprite. White sprites take the colour best. |
| Name | The words players see, for example "Old Mill". Leave empty for no name. |
| State | Undiscovered, Discovered, Active (the objective), Completed or Hidden; each state has its own look on every display (see Chart Table). |
| Current objective (Active) | Objective colour, a gentle pulse, its name always on screen, and first place when the screen is crowded. Make this the only objective clears it on every other waypoint. |
| Own colour | Use this waypoint's colour instead of the style's (a red door for the red key). |
Show on #
Each of Screen (marker), Screen edge (arrow), Compass, Radar, Full-screen map and Distance can be Style default (follow the HUD's look), Always or Never for this waypoint only. For example a hidden treasure can show on the radar but not on screen.
The buttons under them set everything in one click:
| Button | Shows | Good for |
|---|---|---|
| Everywhere | marker, edge arrow, compass, radar, map | objectives and places |
| Radar and map | radar blip and map pin only | enemies, allies, vehicles (they follow their object as it moves) |
| Map only | map pin only | shops, points of interest |
| Screen only | the marker when it is in view | a nearby item |
From code: waypoint.ShowAs(WaypointShowAs.RadarAndMapOnly). Bearing shows what your game tells it to: it doesn't
decide on its own whether an enemy has been seen.
Reaching it, distances and route #
Distances are measured from the HUD's player (see Fit it into your game).
| Setting | What it does |
|---|---|
| Reached within | The player has reached it inside this distance (metres). 0 = never reached. |
| When reached | Nothing (just the events), Hide while the player is near, Done: switch this waypoint off, Done: mark it completed, or Done: show the next waypoint (this one becomes Completed; a trail; see Objective trails). |
| Next waypoint | The waypoint switched on by "show the next waypoint". The objective moves along with it. |
| Hide when closer than | Hide the markers when the player is closer than this. 0 = off. |
| Hide when farther than | Hide the markers when the player is farther than this. 0 = off. |
| Route here | How a Waypoint Route leads to this place: Route default, or its own (Fastest, Prefer roads, Roads only, Straight line, Off). See Routes. |
Markers don't flicker when the player stands right at one of these distances (a 1 m band).
Placement, priority and group #
| Setting | What it does |
|---|---|
| Mark Above Object | The marker sits just above the object's top (from its renderers or colliders), not at its pivot. |
| Offset | Moves the marker, in metres. |
| Priority | When the screen is crowded, higher numbers are shown first. |
| Group | A name such as "Shops" so a whole group can be shown or hidden at once (WaypointRegistry.SetGroupVisible). |
| Save Id | Used by WaypointSave; filled in for you. The scene check warns if two waypoints share one. |
Own look #
Style for this waypoint gives one waypoint its own marker look, colours and sizes. Leave it empty to use the HUD's style.
Events #
On Reached and On Left run when the player walks into and out of the reach radius: open a door, play a sound, show a message. No code needed.
Removing a marker #
Switch the Waypoint (or its object) off, or destroy the object: the marker, arrow, compass icon and blip disappear at once.