ZionGames Docs
```cshtml

Home / Zion Modules / Zion XRay

🧩 Zion XRay

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

Quick Start

This guide creates a basic working Zion XRay setup with scanner input, an active objective, XRay highlighting and a GPS trail.

1. Add Zion XRay to the player

Select your player object and add the main Zion XRay components, or use the Setup Wizard.

  • ZionXRayController
  • ZionXRayScanner
  • ZionXRayGpsTrail

2. Create an Input Action

Create an Input Action for scanner mode, then assign it to the Xray Action field on ZionXRayController.

Example action setup:

Setting Suggested Value
Action Map Gameplay
Action Name XRay
Action Type Button
Keyboard Binding Q, Left Alt or Mouse Button 4
Gamepad Binding Left Shoulder, Right Stick Press or D-Pad

3. Add a target

Select an object in your scene that should be detectable, then add:

  • ZionXRayTarget
  • ZionXRayTargetHighlighter

Give the target a display name and choose an appropriate target type such as Objective, Enemy, Pickup or Interactable.

4. Set the active objective

Zion XRay needs one current objective for the GPS trail and active-target highlight. In the included demo setup, this is handled by ZionXRayDemoObjectiveProvider.

objectiveProvider.SetActiveObjective(targetTransform);
ZionXRayTargetHighlighter.SetGlobalActiveTarget(targetTransform);

5. Bake a NavMesh

The GPS trail needs a valid NavMesh. Bake navigation data for your walkable ground before testing.

6. Test

  1. Enter Play Mode.
  2. Activate the assigned XRay input.
  3. Confirm the scanner HUD appears.
  4. Confirm the GPS trail leads toward the active target.
  5. Confirm the active target receives an XRay highlight.
Demo controls: In the included sample setup, keys 1–5 change the active objective so you can quickly test objective switching, GPS rebuilding and highlighting.