ZionGames Docs
```cshtml

Home / Zion Modules / Zion XRay

๐Ÿงฉ Zion XRay

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

Integration

Zion XRay is built to sit alongside your own gameplay architecture. It does not need to know whether an objective comes from a quest, an enemy AI state, an interactable puzzle, a loot system or a scripted sequence.

Recommended architecture

Your Quest / Gameplay System
        โ†“
Sets current objective transform
        โ†“
Zion XRay Objective Provider
        โ†“
GPS Trail + HUD + Markers + XRay Highlight

Set a new objective

Whenever your game chooses a new objective, update both the objective provider and active highlight:

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

Clear the current objective

When a mission completes or no target should be shown, clear the objective and active highlight:

public void ClearXRayObjective()
{
    objectiveProvider.ClearActiveObjective();
    ZionXRayTargetHighlighter.SetGlobalActiveTarget(null);
}

Example: pickup objective

using UnityEngine;
using ZionGames.XRay;

public class QuestPickupObjective : MonoBehaviour
{
    [SerializeField] private ZionXRayDemoObjectiveProvider objectiveProvider;
    [SerializeField] private Transform pickupTarget;

    private void Start()
    {
        objectiveProvider.SetActiveObjective(pickupTarget);
        ZionXRayTargetHighlighter.SetGlobalActiveTarget(pickupTarget);
    }

    public void OnPickupCollected()
    {
        objectiveProvider.ClearActiveObjective();
        ZionXRayTargetHighlighter.SetGlobalActiveTarget(null);
    }
}

Production recommendation

The included demo objective provider is useful for testing. In a larger game, create a small bridge class between your quest system and Zion XRay, then keep all objective updates in that one place. This makes it easier to replace or extend your objective system later.

Good pattern: Your quest system owns the mission state. Zion XRay only receives the transform that represents the current target.