ZionGames Docs
```cshtml

Home / Zion Modules / Zion XRay

🧩 Zion XRay

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

Objectives & GPS Trail

Zion XRay separates gameplay ownership from visual guidance. Your quest or mission system decides what the player should do next. Zion XRay reads that objective and presents it using highlights, distance information, markers and a GPS trail.

Active objective flow

  1. Your gameplay system chooses an objective transform.
  2. The objective provider is updated.
  3. The active highlight target is updated.
  4. The GPS trail rebuilds toward the new target.
  5. The HUD and markers display current objective information.

Demo objective provider

The sample scene uses ZionXRayDemoObjectiveProvider. It exists to make testing easy and should be replaced or driven by your own quest logic in a production game.

using UnityEngine;
using ZionGames.XRay;

public class ExampleQuestBridge : MonoBehaviour
{
    [SerializeField] private ZionXRayDemoObjectiveProvider objectiveProvider;

    public void SetCurrentObjective(Transform objective)
    {
        objectiveProvider.SetActiveObjective(objective);
        ZionXRayTargetHighlighter.SetGlobalActiveTarget(objective);
    }
}

GPS requirements

  • The player must be positioned on or close to the NavMesh.
  • The target must be reachable by the baked NavMesh.
  • Ground geometry needs to be marked as walkable before baking.
  • Disconnected NavMesh islands cannot create a valid path between each other.

When the trail rebuilds

The GPS trail should rebuild when the active objective changes or when the path becomes invalid. It does not need to generate a new path every frame.

GPS is guidance, not pathfinding AI. The trail guides the player visually. It does not move the player, avoid combat, open doors or solve mission logic.