Overlay Icon

v1.0

The Overlay Icon component should be added to any prefab that is used as an on-screen icon for the Edge Overlay, Screen Overlay or Navigation Bar systems.

An icon for the Overlay systems will not also have a Compass Icon component on it. Objects which are tracked using both the Compass/Radar and Northstar Screen Overlay options will require two separate icon prefabs.

Arrow Image is the Sprite used for the Edge Overlay.

Distance Checks

While checking for distance is not particularly intensive, for projects where icons may be very very far away, you can optionally set a number of tiers at which the distance will be checked less frequently.

A frequency of -1 means the distance will be checked every frame. This is the suggested value when objects are close, as any distance based effects such as size or opacity by distance, will demonstrate a "pop" effect if they are not checked every frame.

Public Members

Note there are many more public members. Check the scripts for full details.

// Get the Distance to the Target
var distanceToTarget = OverlayIcon.DistanceToTarget;

// Camera and Objects being tracked
Camera targetCamera = OverlayIcon.TargetCamera;
Transform targetCameraTransform = OverlayIcon.CameraTransform;
GameObject objectBeingTracked = OverlayIcon.TrackedObject;
Transform transformBeingTracked = OverlayIcon.TrackedTransform;

// If radar ping is active and not updating position, this may not be the 
// current position; would be the last updated position.
Vector3 lastTrackedPosition = OverlayIcon.TrackedPosition;

// Get the percent from minimum distance to maximum distance the target currently
// is at, based on each systems min/max values.
float screenDistancePercent = OverlayIcon.ScreenDistancePercent;
float edgeDistancePercent = OverlayIcon.EdgeDistancePercent;
float navigationBarDistancePercent = OverlayIcon.NavigationBarDistancePercent;

Last updated