ZionGames Docs

Home / Zion Modules / Zion XRay

🧩 Zion XRay

Scanner mode, world markers, GPS objective trails and setup diagnostics for Unity 6.

XRay Highlights

ZionXRayTargetHighlighter renders the visible XRay effect for an active target. In version 1.1, the supported launch highlight mode is the stable filled XRay silhouette.

1.1 launch note: Experimental outline-only highlighting is not included in this release. The stable filled silhouette is the recommended through-wall highlight mode.

Required components

  • ZionXRayTarget
  • ZionXRayTargetHighlighter
  • A supported renderer, such as MeshRenderer or SkinnedMeshRenderer
  • A valid XRay highlight material reference where highlighting is required

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 material are working.

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

Highlight material references

If a highlighter has no material assigned, markers, HUD and GPS can still work, but that object will not receive through-wall highlighting. The Diagnostics window reports missing highlighter material references as warnings.

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.