ZionGames Docs
```cshtml

Home / Zion Modules / Zion XRay

🧩 Zion XRay

Scanner mode, active-objective highlighting, world markers and NavMesh GPS trails for Unity projects.

XRay Highlights

ZionXRayTargetHighlighter renders the visible XRay effect for an active target. It can show an objective through walls and level geometry while scanner mode is active.

Required components

Add these components to any object that should receive XRay highlighting:

  • ZionXRayTarget
  • ZionXRayTargetHighlighter
  • A supported renderer, such as MeshRenderer or SkinnedMeshRenderer

How active highlighting works

The active objective should be passed to the highlighter when your gameplay objective changes:

ZionXRayTargetHighlighter.SetGlobalActiveTarget(targetTransform);

Only the object matching that transform should receive the current active-target XRay effect. The demo objective switcher does this automatically when using the sample controls.

Force Show For Testing

The Force Show For Testing option is for validating that a target renderer and the XRay shader are working.

Production use: Leave Force Show For Testing disabled in your real scenes. When enabled, the target is highlighted permanently and will ignore normal active-objective behaviour.

Highlight colours

Default XRay colours are selected from the ZionXRayTargetType on the target. You can use the target type to communicate meaning quickly to players:

  • Cyan: mission objective or waypoint.
  • Red: enemy or danger.
  • Green: pickup or collectible.
  • Yellow: interactable object.
  • Purple: general object or custom point of interest.

Testing through-wall behaviour

  1. Place a target behind a wall or solid object.
  2. Set that target as the active objective.
  3. Activate scanner mode.
  4. Confirm the target remains visible through the wall.
  5. Change objective and confirm the previous highlight clears.