Skip to main content

Class NavigationArrowShaderPanel

Shader-based implementation of NavigationArrowPanel that updates a material’s shader properties to display a navigation arrow indicating the immediate direction to the next target.

public class NavigationArrowShaderPanel : NavigationArrowPanel, IHandle<NavigationMessages.NavigationDirectionMessage>

Inheritance​

Implements​

IHandle<NavigationMessages.NavigationDirectionMessage>

Inherited Members​

Fields​

debugAngleInDegrees​

The most recently evaluated navigation angle, used by Unity Editor for debugging.

[NonSerialized]
public float debugAngleInDegrees

Field Value​

float

Methods​

Handle(NavigationDirectionMessage)​

Handles incoming NavigationDirectionMessage events by updating the shader properties on the target material to reflect the target angle.

public override void Handle(NavigationMessages.NavigationDirectionMessage message)

Parameters​

NameTypeDescription
messageNavigationMessages.NavigationDirectionMessageThe navigation direction message containing the angle in degrees between the object's forward direction and the direction toward the target waypoint.

Start()​

Initializes the shader panel and disables the navigation arrow by default to ensure it only appears when receiving a valid navigation update.

protected override void Start()
  • Fields
    • debugAngleInDegrees
  • Methods
    • Handle(NavigationDirectionMessage)
    • Start()