Navigation Bar

v1.0

Prior to release, the Northstar Navigation Bar was called "Compass Bar". While I'm attempting to update all references in the scripts and documentation, if you see "Compass Bar", know that it is now referred to as "Navigation Bar". Thanks!

You can set and reset overrides through the Northstar Navigation Bar component (child of your Canvas), or on the individual Northstar Icons, whichever works best for your use case.

Reference Northstar Navigation Bar:

NavigationBar.Instance.SetOverrideColor("Default", Color.Blue);

Available Runtime Overrides

Remember, each Set method will have two signatures, one for a single icon, and one for all of a string type. There will also be two Reset methods for each. Each Set method will take in an appropriate value as well.

// Clamps the maximum opacity for the icon.
SetOverrideNavigationBarMaxOpacity(northstarIcon, 0.5f);
ResetOverrideNavigationBarMaxOpacity(northstarIcon);

// Clamps the maximum icon size.
SetOverrideNavigationBarMaxSize(northstarIcon, 30);
ResetOverrideNavigationBarMaxSize(northstarIcon);


// Sets the color of each of the icons
// NOTE: Navigation Bar color handled by NorthstarCompassbar!
SetOverrideNavigationBarColor(northstarIcon, Color.Cyan); // Sets both Screen & Edge Overlay
ResetOverrideNavigationBarColor(northstarIcon); // Sets both Screen & Edge Overlay


// Sets the sprite to use for the icon. Color and opacity are handled separately.
SetOverrideNavigationBarSprite(northstarIcon, newSpriteValue);
ResetOverrideNavigationBarSprite(northstarIcon);


// Set the Y and X position (localPosition)
SetOverrideNavigationBarYPosition(northstarIcon, 30);
ResetOverrideNavigationBarYPosition(northstarIcon);

SetOverrideNavigationBarXPosition(northstarIcon, 30);
ResetOverrideNavigationBarXPosition(northstarIcon);


// Sets the minimum distance at which the distance opacity starts being affected. 
// (i.e. everything closer than this value is 100% "visible")
SetOverrideNavigationBarDistanceMin(northstarIcon, 50f); 
ResetOverrideNavigationBarDistanceMin(northstarIcon); 

// Sets the maximum distance at which the distance opacity fades out. 
// (i.e. everything further than this value is 0% "visible")
SetOverrideNavigationBarDistanceMax(northstarIcon, 200f); 
ResetOverrideNavigationBarDistanceMax(northstarIcon); 

Last updated