API
Gameplay HUD
Damage numbers, routes, markers, indicators, the compass, pings and panels.
PassForgeBeacon
Raises a beacon from this object: a tall pillar of light, seen from far away, that marks an objective. It stands straight up the world's Y axis, in 3D and in 2D side views alike, fades as the camera comes close so it never blocks the view, and can paint a ring on the ground around its foot. Switch the component on and off, or call Show(GameObject) and Hide(GameObject) from a quest script. Up to maxShown show at once, the nearest to the camera first. Each sets its own look and needs no Volume; the Beacons effect on a Volume or a Screen Look sets what every beacon shares, such as Show Through Walls.
public sealed class PassForgeBeacon : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Beacon.
PassForgeBeacon.maxShown
Most beacons that show at once. When more are enabled, the nearest to the camera show.
public const int maxShown = 16
PassForgeBeacon.activeCount
Number of beacons currently enabled.
public static int activeCount { get; }
PassForgeBeacon.color
Color of the beacon's light. Alpha sets how strongly it shows; HDR values glow brighter.
public Color color { get; set; }
PassForgeBeacon.height
How tall the pillar stands above its foot, in world units.
public float height { get; set; }
PassForgeBeacon.width
Width of the pillar's bright core, in world units.
public float width { get; set; }
PassForgeBeacon.pulseSpeed
Pulses of light per second, from 0 to 4. Zero holds the beacon steady.
public float pulseSpeed { get; set; }
PassForgeBeacon.ring
Whether a ring is painted on the ground around the beacon's foot.
public bool ring { get; set; }
PassForgeBeacon.ringRadius
Radius of the ring on the ground, in world units.
public float ringRadius { get; set; }
PassForgeBeacon.offset
Where the pillar's foot is, in the object's local space.
public Vector3 offset { get; set; }
PassForgeBeacon.Show(GameObject)
Raises a beacon from an object, such as a quest's next objective: switches its Beacon on, or adds one with the default look when it has none. Returns the beacon, so a script can set its look, or null for no object. The beacon shows while the object is active.
public static PassForgeBeacon Show(GameObject target)
PassForgeBeacon.Show(Component)
Raises a beacon from the object a component is on. See Show(GameObject).
public static PassForgeBeacon Show(Component target)
PassForgeBeacon.Hide(GameObject)
Lowers the beacons raised from an object: switches off every Beacon on it. They keep their look, so Show(GameObject) raises the same beacon again.
public static void Hide(GameObject target)
PassForgeBeacon.Hide(Component)
Lowers the beacons raised from the object a component is on. See Hide(GameObject).
public static void Hide(Component target)
PassForgeBeacon.HideAll()
Lowers every beacon shown, such as when a quest ends. Each keeps its look.
public static void HideAll()
PassForgeDamageNumbers
Shows numbers and short words that pop from where a hit lands, rise and fade: damage, criticals, heals, blocks, misses and gains, drawn by Pass Forge with no canvas, font or prefab. Quick hits on one object add up into one number. Up to 32 show at once. Call Spawn(Transform, float, DamageNumberKind) from a script; no Volume is needed, and the Damage Numbers effect in a Volume restyles every number. On an object, this component sets where its numbers start, their size and colors, and shows them from UnityEvents. Switched off, it turns numbers off for its object. A PassForgeMoment with a Damage Number step shows them too, with the value it is played with through PassForgeMoment.PlayWithValue(float).
public sealed class PassForgeDamageNumbers : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Damage Numbers.
PassForgeDamageNumbers.maxShown
Most numbers that show at once. Past it, the oldest is cut short.
public const int maxShown = DamageNumberSet.capacity
PassForgeDamageNumbers.maxCharacters
Most characters a number or word shows.
public const int maxCharacters = DamageNumberText.maxCharacters
PassForgeDamageNumbers.activeCount
Numbers still showing.
public static int activeCount { get; }
PassForgeDamageNumbers.visible
False hides every number at once and ignores new ones, for a game option that turns damage numbers off. The game keeps this choice itself; Pass Forge does not save it.
public static bool visible { get; set; }
PassForgeDamageNumbers.unscaledTime
True, as it starts, counts numbers in real time, so they pop and rise through hit stops and pause menus, as interface text does. False freezes them with the game's time. Changing it ends the numbers showing.
public static bool unscaledTime { get; set; }
PassForgeDamageNumbers.startAtTop
Start numbers at the top of this object's renderers, so they clear its head.
public bool startAtTop { get; set; }
PassForgeDamageNumbers.offset
Moves where numbers start, in world units, turned with the object.
public Vector3 offset { get; set; }
PassForgeDamageNumbers.follow
Numbers move with this object while they show.
public bool follow { get; set; }
PassForgeDamageNumbers.size
Height of a number, as a share of the screen height, from 0.01 to 0.2.
public float size { get; set; }
PassForgeDamageNumbers.GetColor(DamageNumberKind)
The color numbers of a kind show in over this object.
public Color GetColor(DamageNumberKind kind)
PassForgeDamageNumbers.SetColor(DamageNumberKind, Color)
Sets the color numbers of a kind show in over this object.
public void SetColor(DamageNumberKind kind, Color color)
PassForgeDamageNumbers.ShowDamage(float)
Shows damage over this object.
public void ShowDamage(float amount)
PassForgeDamageNumbers.ShowDamage(int)
Shows damage over this object, for events that send whole numbers.
public void ShowDamage(int amount)
PassForgeDamageNumbers.ShowCritical(float)
Shows a critical hit over this object.
public void ShowCritical(float amount)
PassForgeDamageNumbers.ShowCritical(int)
Shows a critical hit over this object, for events that send whole numbers.
public void ShowCritical(int amount)
PassForgeDamageNumbers.ShowHeal(float)
Shows a heal over this object, with a plus.
public void ShowHeal(float amount)
PassForgeDamageNumbers.ShowHeal(int)
Shows a heal over this object, with a plus, for events that send whole numbers.
public void ShowHeal(int amount)
PassForgeDamageNumbers.ShowGain(float)
Shows a gain, such as gold or experience, over this object, with a plus.
public void ShowGain(float amount)
PassForgeDamageNumbers.ShowGain(int)
Shows a gain over this object, with a plus, for events that send whole numbers.
public void ShowGain(int amount)
PassForgeDamageNumbers.ShowChange(float)
For a health changed event: below zero shows the damage, above zero a heal, and zero nothing.
public void ShowChange(float change)
PassForgeDamageNumbers.ShowChange(int)
For a health changed event that sends whole numbers: below zero is damage, above zero a heal.
public void ShowChange(int change)
PassForgeDamageNumbers.ShowBlocked()
Shows BLOCKED over this object.
public void ShowBlocked()
PassForgeDamageNumbers.ShowMiss()
Shows MISS over this object.
public void ShowMiss()
PassForgeDamageNumbers.ShowText(string)
Shows a short word over this object, such as DODGE or IMMUNE, in the miss color.
public void ShowText(string text)
PassForgeDamageNumbers.Show(float, DamageNumberKind)
Shows a number of a kind over this object.
public void Show(float value, DamageNumberKind kind)
PassForgeDamageNumbers.Spawn(Vector3, float, DamageNumberKind)
Shows a number at a point in the world. Numbers at points never add up.
public static void Spawn(Vector3 position, float value, DamageNumberKind kind = DamageNumberKind.Damage)
PassForgeDamageNumbers.Spawn(Vector3, float, DamageNumberKind, string)
Shows a number with a short suffix such as XP, as +10 XP, at a point.
public static void Spawn(Vector3 position, float value, DamageNumberKind kind, string suffix)
PassForgeDamageNumbers.Spawn(Vector3, float, DamageNumberKind, Color)
Shows a number in a color of its own, such as orange for fire or green for poison, at a point. The color is as picked; a Volume restyling the kind colors does not take it over.
public static void Spawn(Vector3 position, float value, DamageNumberKind kind, Color color)
PassForgeDamageNumbers.Spawn(Transform, float, DamageNumberKind)
Shows a number over an object, at the top of its renderers or where its Damage Numbers component says, in that component's look. Quick hits of the same kind on it add up into one number. Null does nothing.
public static void Spawn(Transform target, float value, DamageNumberKind kind = DamageNumberKind.Damage)
PassForgeDamageNumbers.Spawn(Transform, float, DamageNumberKind, string)
Shows a number with a short suffix such as XP over an object.
public static void Spawn(Transform target, float value, DamageNumberKind kind, string suffix)
PassForgeDamageNumbers.Spawn(Transform, float, DamageNumberKind, Color)
Shows a number in a color of its own, such as orange for fire, over an object. A Volume restyling the kind colors does not take it over.
public static void Spawn(Transform target, float value, DamageNumberKind kind, Color color)
PassForgeDamageNumbers.SpawnText(Vector3, string, DamageNumberKind)
Shows a short word, such as MISS, BLOCKED or LEVEL UP, at a point: up to 12 letters A to Z, digits and + - . , % ! /. Lower case shows as capitals.
public static void SpawnText(Vector3 position, string text, DamageNumberKind kind = DamageNumberKind.Miss)
PassForgeDamageNumbers.SpawnText(Transform, string, DamageNumberKind)
Shows a short word over an object. The same word on it again pops the one showing.
public static void SpawnText(Transform target, string text, DamageNumberKind kind = DamageNumberKind.Miss)
PassForgeDamageNumbers.Clear()
Removes every number at once, such as after a cut or a respawn.
public static void Clear()
PassForgeGroundMarker
Paints a shape on whatever ground lies under this object, following terrain and stairs: attack warnings that fill up before a strike, selection rings under units, and target zones. Up to five show at once. Each sets its own look and needs no Volume; a Volume setting that is overridden takes over the markers' own. Paints on the surfaces in the camera depth texture, which sprites leave empty, so it does not show in a 2D scene.
public sealed class PassForgeGroundMarker : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Ground Marker.
PassForgeGroundMarker.activeCount
Number of markers currently enabled.
public static int activeCount { get; }
PassForgeGroundMarker.shape
Shape the marker paints.
public MarkerShape shape { get; set; }
PassForgeGroundMarker.radius
Radius of the shape in world units, or the length of a line.
public float radius { get; set; }
PassForgeGroundMarker.angle
Opening angle of a cone, in degrees.
public float angle { get; set; }
PassForgeGroundMarker.width
Width of a ring or a line, in world units.
public float width { get; set; }
PassForgeGroundMarker.fill
How far the shape has filled up, from 0 to 1.
public float fill { get; set; }
PassForgeGroundMarker.fillSeconds
Seconds the shape takes to fill up once enabled in play; zero leaves Fill to scripts.
public float fillSeconds { get; set; }
PassForgeGroundMarker.whenFull
A moment played where the marker is once it has filled up.
public PassForgeMoment whenFull { get; set; }
PassForgeGroundMarker.switchOffWhenFull
Hide the marker once it has filled up, until it is enabled again or a fill starts.
public bool switchOffWhenFull { get; set; }
PassForgeGroundMarker.onFilled
Called once the marker has filled up.
public UnityEvent onFilled { get; }
PassForgeGroundMarker.isFilling
True while the shape is filling up.
public bool isFilling { get; }
PassForgeGroundMarker.color
Color of the marker.
public Color color { get; set; }
PassForgeGroundMarker.edgeWidth
Width of the bright edge around the shape, in world units.
public float edgeWidth { get; set; }
PassForgeGroundMarker.fillOpacity
How strongly the filled part of the shape covers the ground, from 0 to 1.
public float fillOpacity { get; set; }
PassForgeGroundMarker.pulse
How much the edge pulses, from 0 to 1.
public float pulse { get; set; }
PassForgeGroundMarker.StartFilling(float)
Fills the shape up from empty over the seconds, showing the marker if it is off or hidden, then plays When Full, calls On Filled and hides the marker if it is set to. Works in play mode.
public void StartFilling(float seconds)
PassForgeGroundMarker.StopFilling()
Stops a running fill where it is.
public void StopFilling()
PassForgeOffscreenIndicator
Shows a glowing marker at the edge of the screen pointing toward the object whenever it is off screen, for objectives, allies and threats: an arrow, a chevron or an icon of your own, gently brightening and dimming. Indicators pointing the same way spread along the edge. Up to sixteen show at once, the nearest when more would, with up to eight different icons. Needs no Volume; a Volume restyles them. Compass Bars and Fog of War Radars show the object too, and with Show At Screen Edge off it shows only there.
public sealed class PassForgeOffscreenIndicator : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Off-screen Indicator.
PassForgeOffscreenIndicator.activeCount
Number of indicators currently enabled.
public static int activeCount { get; }
PassForgeOffscreenIndicator.showAtScreenEdge
Show the indicator at the edge of the screen, and over its object when Only When Off Screen is off. Off keeps it to Compass Bars and Fog of War Radars.
public bool showAtScreenEdge { get; set; }
PassForgeOffscreenIndicator.showOnCompass
Show this object on Compass Bars too, with its icon, color and distance.
public bool showOnCompass { get; set; }
PassForgeOffscreenIndicator.color
Color of the indicator.
public Color color { get; set; }
PassForgeOffscreenIndicator.onlyWhenOffScreen
Show the indicator only while the object is off screen.
public bool onlyWhenOffScreen { get; set; }
PassForgeOffscreenIndicator.offset
Point the indicator tracks, in the object's local space.
public Vector3 offset { get; set; }
PassForgeOffscreenIndicator.shape
What the indicator draws.
public IndicatorShape shape { get; set; }
PassForgeOffscreenIndicator.icon
The icon the Icon shape draws.
public Texture2D icon { get; set; }
PassForgeOffscreenIndicator.pulseSpeed
How fast the indicator gently brightens and dims.
public float pulseSpeed { get; set; }
PassForgeOffscreenIndicator.pulse
How much the indicator gently brightens and dims, from 0 to 1.
public float pulse { get; set; }
PassForgeOffscreenIndicator.size
Size of the indicator, as a share of the screen height.
public float size { get; set; }
PassForgeOffscreenIndicator.showDistance
Show how far away the object is, in meters, beside the indicator.
public bool showDistance { get; set; }
PassForgeOffscreenIndicator.hideCloserThan
Meters within which the indicator hides, such as once the player has reached the object. Zero never hides it.
public float hideCloserThan { get; set; }
PassForgeOffscreenIndicator.hideFartherThan
Meters beyond which the indicator hides, so only what is near shows. Zero shows it at any distance.
public float hideFartherThan { get; set; }
PassForgeOffscreenIndicator.measureFrom
The object this indicator's distance is measured from, for Show Distance and the Hide Closer and Farther Than settings. Null measures from distanceFrom, else the object tagged Player, else the camera.
public Transform measureFrom { get; set; }
PassForgeOffscreenIndicator.distanceFrom
What distances are measured from. Empty uses the object tagged Player, or the camera when there is none.
public static Transform distanceFrom { get; set; }
PassForgeOffscreenIndicator.nudgeSpeed
How many times a second the indicator draws back and darts toward the object, off screen.
public float nudgeSpeed { get; set; }
PassForgeOffscreenIndicator.bob
How much the indicator bobs up and down while its object is on screen, from 0 to 1.
public float bob { get; set; }
PassForgeOffscreenIndicator.glow
How much light glows around the indicator.
public float glow { get; set; }
PassForgeOffscreenIndicator.AddHudArea(RectTransform)
Keeps off screen indicators clear of a piece of the game's HUD on a screen space canvas, such as a health bar or a map: they go around it instead of sliding under it. A Fog of War Minimap does this for itself.
public static void AddHudArea(RectTransform area)
PassForgeOffscreenIndicator.RemoveHudArea(RectTransform)
Lets off screen indicators sit over a piece of the HUD again.
public static void RemoveHudArea(RectTransform area)
PassForgePings
Pings on Pass Forge's HUD: a mark at a place for a few seconds, for an alarm, an explosion or a call for help the player should turn toward. Compass Bars and Fog of War Radars show them, however far away they are and even where the fog hides the place. A ping can also reveal enemies within its ring on radars for its seconds, like a sonar. Up to eight show at once; a new one replaces the oldest, and one close to a showing ping of the same color starts it again. Pings count time on the same clock as Damage Numbers: through Hit Stop and pause menus, and they hold still while the editor is paused.
public static class PassForgePings
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgePings.maxPings
Most pings that show at once; a new one replaces the oldest.
public const int maxPings = 8
PassForgePings.activeCount
Pings still showing.
public static int activeCount { get; }
PassForgePings.Ping(Vector3, Color, float, float)
Shows a ping on every Compass Bar and Fog of War Radar at a point in the world for a few seconds, for an alarm, an explosion or a call for help the player should turn toward.
public static void Ping(Vector3 position, Color color, float seconds = 3f, float radius = 8f)
PassForgePings.Ping(Vector3, Color, Texture2D, float, float)
Shows a ping with an icon of the game's own in its middle, tinted by its color, on every Compass Bar and Fog of War Radar at a point in the world for a few seconds. It shares the eight icons Off-screen Indicators draw from; with all eight taken, it shows the ring alone.
public static void Ping(Vector3 position, Color color, Texture2D icon, float seconds = 3f, float radius = 8f)
PassForgePings.Ping(Vector3, Color, PingShape, float, float)
Shows a ping with a sign in its middle, such as PingShape.Enemy for an enemy spotted or PingShape.Help for a call for help, on every Compass Bar and Fog of War Radar at a point in the world for a few seconds.
public static void Ping(Vector3 position, Color color, PingShape shape, float seconds = 3f, float radius = 8f)
PassForgePings.Ping(Vector3, Color, float, float, bool, PingShape, Texture2D)
Shows a ping on every Compass Bar and Fog of War Radar at a point in the world, and with revealEnemies on, shows the enemies within its radius on radars for its seconds, even where the fog hides them, like a sonar.
public static void Ping(Vector3 position, Color color, float seconds, float radius, bool revealEnemies, PingShape shape = PingShape.Ring, Texture2D icon = null)
PassForgePings.Ping(Transform, Color, float, float, PingShape)
Shows a ping that follows an object while it shows, such as an ally calling for help. When the object is destroyed, the ping stays where the object was last. A null object shows nothing.
public static void Ping(Transform target, Color color, float seconds = 3f, float radius = 8f, PingShape shape = PingShape.Ring)
PassForgePings.Clear()
Clears every ping at once, such as when the player respawns.
public static void Clear()
PassForgeRoute
Shows the way from the player to a destination: on every Fog of War Minimap and Radar, as a caret on every Compass Bar pointing the way to walk now, and as a line of arrows on the ground. Put it on the player and give it a Target object or a Point. The path follows the NavMesh when the project has the AI Navigation package and a NavMesh near the player; otherwise it is a straight line, your Waypoints, or the points your own pathfinder gives SetPath. By default the route stops where the Fog of War has not been explored. It hides once the player arrives, plays When Arrived and calls On Arrived, in Play Mode only. One route shows at a time: the one enabled last. While it has no destination nothing runs.
public sealed class PassForgeRoute : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Route.
PassForgeRoute.maxPathPoints
The most points a path keeps. A longer NavMesh path is cut there, and the status says so.
public const int maxPathPoints = 256
PassForgeRoute.maxGroundSegments
The most pieces of line the ground shows at once.
public const int maxGroundSegments = 32
PassForgeRoute.maxMapPoints
The most points a minimap or radar draws the route with, after simplifying it.
public const int maxMapPoints = 32
PassForgeRoute.current
The route that works and shows: the one enabled last. Null when none is enabled.
public static PassForgeRoute current { get; }
PassForgeRoute.activeCount
Number of routes currently enabled. Only current works and shows.
public static int activeCount { get; }
PassForgeRoute.destination
Where the route leads: target or point.
public RouteDestination destination { get; set; }
PassForgeRoute.target
The object the route leads to while destination is Target.
public Transform target { get; set; }
PassForgeRoute.point
The place the route leads to while destination is Point.
public Vector3 point { get; set; }
PassForgeRoute.from
Where the route starts. Null starts at this object.
public Transform from { get; set; }
PassForgeRoute.arriveDistance
Meters from the destination that count as arrived, at least 0.1.
public float arriveDistance { get; set; }
PassForgeRoute.hideWhenArrived
Hide the route once the player arrives, until a new destination is set.
public bool hideWhenArrived { get; set; }
PassForgeRoute.whenArrived
A moment played at the destination when the player arrives, in Play Mode.
public PassForgeMoment whenArrived { get; set; }
PassForgeRoute.onArrived
Called when the player arrives at the route's own destination, in Play Mode: once per destination with hideWhenArrived on, and each time the player arrives again with it off.
public UnityEvent onArrived { get; }
PassForgeRoute.pathing
How the path is found.
public RoutePathing pathing { get; set; }
PassForgeRoute.agentTypeId
The NavMesh agent type the path is found for, as NavMesh.GetSettingsByIndex(i).agentTypeID gives it. Read only with the AI Navigation package.
public int agentTypeId { get; set; }
PassForgeRoute.areaMask
The NavMesh areas the route may use, one bit for each area; -1 for all. Read only with a NavMesh.
public int areaMask { get; set; }
PassForgeRoute.snapDistance
How far the player and the destination may be from the NavMesh and still be found on it, in meters.
public float snapDistance { get; set; }
PassForgeRoute.whenNoPath
What shows when the NavMesh has no path to the destination.
public RouteNoPath whenNoPath { get; set; }
PassForgeRoute.repathSeconds
How often the path is found again, in seconds, from 0.1 to 5.
public float repathSeconds { get; set; }
PassForgeRoute.waypoints
The Waypoints mode's waypoints, in order. Change the list, then call Recalculate.
public List<Transform> waypoints { get; }
PassForgeRoute.groundLayers
Without a NavMesh, the layers the line on the ground is laid onto between points. Needs the Physics module.
public LayerMask groundLayers { get; set; }
PassForgeRoute.fogRule
What the route does where the Fog of War has not been explored.
public RouteFogRule fogRule { get; set; }
PassForgeRoute.fog
The Fog of War the rule reads. Null uses PassForgeFogOfWar.current.
public PassForgeFogOfWar fog { get; set; }
PassForgeRoute.style
Arrows, a solid line, or dashes.
public RouteStyle style { get; set; }
PassForgeRoute.color
Color of the route, as picked in a color picker. Alpha sets how strongly it shows.
public Color color { get; set; }
PassForgeRoute.width
Width of the line on the ground, in meters, from 0.05 to 3.
public float width { get; set; }
PassForgeRoute.glow
Soft light around the line, from 0 to 1.
public float glow { get; set; }
PassForgeRoute.outline
Dark edge around the line, from 0 to 1.
public float outline { get; set; }
PassForgeRoute.flowSpeed
Meters per second the arrows or dashes move toward the destination, from 0 to 10.
public float flowSpeed { get; set; }
PassForgeRoute.startGap
Meters in front of the player where the line on the ground starts, from 0 to 10.
public float startGap { get; set; }
PassForgeRoute.reach
Meters of route drawn on the ground, from 5 to 120. Maps are not limited by it.
public float reach { get; set; }
PassForgeRoute.showOnGround
Show the line on the ground, a screen effect that needs Set Up Effects and Post Processing.
public bool showOnGround { get; set; }
PassForgeRoute.showOnMaps
Show the route on Fog of War Minimaps and Radars that have Show Route on.
public bool showOnMaps { get; set; }
PassForgeRoute.showOnCompass
Show a caret on Compass Bars that have Show Route on.
public bool showOnCompass { get; set; }
PassForgeRoute.lookAhead
How far along the route the compass caret points, in meters, from 1 to 30.
public float lookAhead { get; set; }
PassForgeRoute.status
What the route found, as of its last update.
public RouteStatus status { get; }
PassForgeRoute.remainingDistance
Meters along the route from the player to its end, as of its last update: 0 once arrived, -1 with no route.
public float remainingDistance { get; }
PassForgeRoute.isShowing
True while the route has something to show, as of its last update.
public bool isShowing { get; }
PassForgeRoute.targets
The objects Nearest Of List and List In Order lead to. Changes show at once.
public List<Transform> targets { get; }
PassForgeRoute.targetTag
The tag of the objects Nearest With Tag leads to.
public string targetTag { get; set; }
PassForgeRoute.SetDestination(Vector3)
Leads the route to a place from now on, and shows it again if it was hidden after arriving. Ends a route ShowTo(Vector3, float) was showing.
public void SetDestination(Vector3 worldPoint)
PassForgeRoute.SetDestination(Transform)
Leads the route to an object from now on, following it as it moves, and shows it again if it was hidden after arriving. Ends a route ShowTo(Transform, float) was showing. Null leaves no destination.
public void SetDestination(Transform target)
PassForgeRoute.ShowTo(Vector3, float)
Leads the route to a place for a while, then back to its own destination: after the seconds, once the player arrives there, or when another ShowTo or SetDestination replaces it. Zero seconds lasts until the player arrives or it is replaced. When Arrived and On Arrived stay for the route's own destination. With Pathing set to Waypoints or Points From Script, the way there is found as Auto finds it.
public void ShowTo(Vector3 worldPoint, float seconds)
PassForgeRoute.ShowTo(Transform, float)
Leads the route to an object for a while, following it as it moves, then back to its own destination, as ShowTo(Vector3, float) does. A null object changes nothing.
public void ShowTo(Transform target, float seconds)
PassForgeRoute.ClearDestination()
Leaves the route with nowhere to go, so nothing shows until a destination is set again.
public void ClearDestination()
PassForgeRoute.SetPath(Vector3[], int)
Points From Script: copies the points, so the array can be reused, switches Pathing to Points From Script and shows the route along them from the player's place on them to their last point. Up to 256 points are kept. Call it again whenever your pathfinder finds a new path; nothing allocates.
public void SetPath(Vector3[] points, int count)
PassForgeRoute.SetPath(List<Vector3>)
As SetPath(Vector3[], int), from a list.
public void SetPath(List<Vector3> points)
PassForgeRoute.Recalculate()
Finds the path again now, such as after changing the waypoints.
public void Recalculate()
PassForgeRoute.GetPoints(Vector3[])
Copies the route from the player's place on it to its end into the array, without allocating: the whole path, past where the fog stops it too. Returns how many points were copied, at most the array's length; 0 with no route.
public int GetPoints(Vector3[] results)
PassForgeRoute.TryGetSteerPoint(out Vector3)
Where the compass caret points: Look Ahead meters along the route from the player, held to where the route stops. False while the route shows nothing, or that point is right at the player.
public bool TryGetSteerPoint(out Vector3 worldPoint)
PassForgeRoute.RestartList()
Starts a list or tag over: objects arrived at count again, and List In Order goes back to its first.
public void RestartList()
PassForgeSpotlightTarget
Makes an object the target of the Spotlight effect: the screen dims everywhere but a circle around it, for tutorials and guided moments. With several targets enabled, the one enabled last is lit. Sets its own look and needs no Volume; a Volume setting that is overridden takes over the target's own.
public sealed class PassForgeSpotlightTarget : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Spotlight Target.
PassForgeSpotlightTarget.current
The target the Spotlight lights, or null when none is enabled.
public static PassForgeSpotlightTarget current { get; }
PassForgeSpotlightTarget.fitToRenderers
Size the circle to fit the object's renderers.
public bool fitToRenderers { get; set; }
PassForgeSpotlightTarget.radius
Radius of the circle in world units, when not fitting the renderers.
public float radius { get; set; }
PassForgeSpotlightTarget.padding
Extra room around the object, in world units.
public float padding { get; set; }
PassForgeSpotlightTarget.dim
How dark the rest of the screen gets, from 0 to 1.
public float dim { get; set; }
PassForgeSpotlightTarget.dimColor
Color the rest of the screen dims toward.
public Color dimColor { get; set; }
PassForgeSpotlightTarget.softness
How soft the circle's edge is, as a share of its radius.
public float softness { get; set; }
PassForgeSpotlightTarget.ringColor
Color of the ring around the circle.
public Color ringColor { get; set; }
PassForgeSpotlightTarget.ringWidth
Width of the ring in pixels.
public float ringWidth { get; set; }
PassForgeSpotlightTarget.pulse
How much the ring pulses, from 0 to 1.
public float pulse { get; set; }
PassForgeSpotlightTarget.pulseSpeed
How fast the ring around the circle pulses.
public float pulseSpeed { get; set; }
PassForgeCompassBar
A compass strip for the HUD on a UI Raw Image: N, E, S and W with NE, SE, SW and NW between them, and tick marks that turn with the camera, or with an object such as a vehicle. Every Off-screen Indicator with Show On Compass on shows on the bar with its own icon, color, size and pulse, and its distance; objects outside its view wait at its nearest end. Pings from PassForgePings and the Ping moment step show on it too, and a caret shows the way to walk now along the player's PassForgeRoute. The bar is flat or curved, with its markers on the strip or in a row of their own below it. Off-screen Indicators go around it. It needs no Volume and no Set Up Effects. North is the world's Z axis, or Y in 2D.
public sealed class PassForgeCompassBar : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Compass Bar.
PassForgeCompassBar.viewCamera
The camera whose view the compass follows. Null follows the camera tagged MainCamera. Named so because Component.camera is an obsolete member.
public Camera viewCamera { get; set; }
PassForgeCompassBar.turnWith
An object whose facing the bar follows instead of the camera's, such as a vehicle. Null follows the camera.
public Transform turnWith { get; set; }
PassForgeCompassBar.plane
Which plane directions are read on.
public CompassPlane plane { get; set; }
PassForgeCompassBar.span
Degrees the bar shows from end to end, from 60 to 360.
public float span { get; set; }
PassForgeCompassBar.shape
Flat, or Curved: a band that wraps around in front of the player, its marks crowding toward its ends.
public CompassShape shape { get; set; }
PassForgeCompassBar.curve
How strongly a Curved bar curves, from 0.1 to 1.
public float curve { get; set; }
PassForgeCompassBar.fadeEnds
How far in from each end the bar fades out, as a share of half its width, from 0 to 0.5.
public float fadeEnds { get; set; }
PassForgeCompassBar.backgroundColor
Color of the strip behind the marks.
public Color backgroundColor { get; set; }
PassForgeCompassBar.markColor
Color of the letters, ticks and numbers.
public Color markColor { get; set; }
PassForgeCompassBar.northColor
Color of the N.
public Color northColor { get; set; }
PassForgeCompassBar.outline
How strong the dark edge around letters, ticks and markers is, from 0 to 1.
public float outline { get; set; }
PassForgeCompassBar.intercardinals
Show NE, SE, SW and NW between N, E, S and W.
public bool intercardinals { get; set; }
PassForgeCompassBar.tickEvery
Degrees between tick marks: 0 for none, or 5, 10, 15, 30 or 45. Other values snap to the nearest.
public int tickEvery { get; set; }
PassForgeCompassBar.showDegrees
Write the degrees between the letters.
public bool showDegrees { get; set; }
PassForgeCompassBar.showHeading
Write the heading the player faces in a box at the middle.
public bool showHeading { get; set; }
PassForgeCompassBar.centerMark
A small notch over the middle of the bar.
public bool centerMark { get; set; }
PassForgeCompassBar.letterSize
Height of the letters, as a share of the strip's height, from 0.15 to 0.6. The strip is the whole bar, less how far a Curved bar's ends bend down, and half of that when the markers sit below the strip.
public float letterSize { get; set; }
PassForgeCompassBar.showMarkers
Show Off-screen Indicator objects that have Show On Compass on.
public bool showMarkers { get; set; }
PassForgeCompassBar.markerRow
Where the markers sit: on the strip, over the letters, or in a row of their own under the strip, the two splitting the bar in half.
public CompassMarkerRow markerRow { get; set; }
PassForgeCompassBar.markerSize
Size of the markers, as a share of their row's height, from 0.2 to 1. On The Strip their row is the strip, which is the whole bar unless it is Curved; Below The Strip it is the row under the strip.
public float markerSize { get; set; }
PassForgeCompassBar.distanceLabels
When the bar writes how far away each object is.
public CompassDistance distanceLabels { get; set; }
PassForgeCompassBar.holdAtEnds
Keep objects outside the bar's view at its nearest end.
public bool holdAtEnds { get; set; }
PassForgeCompassBar.heightArrows
Meters above or below beyond which a marker shows a height arrow. Zero shows none.
public float heightArrows { get; set; }
PassForgeCompassBar.hideFartherThan
Meters beyond which objects are left out. Zero shows them at any distance.
public float hideFartherThan { get; set; }
PassForgeCompassBar.measureFrom
Where directions and distances are measured from. Null uses the object tagged Player, or the camera.
public Transform measureFrom { get; set; }
PassForgeCompassBar.spreadOut
Spread markers that point the same way apart.
public bool spreadOut { get; set; }
PassForgeCompassBar.showPings
Show pings from Ping moment steps and PassForgePings.Ping(Vector3, Color, float, float).
public bool showPings { get; set; }
PassForgeCompassBar.showRoute
Show a caret where the current PassForgeRoute leads, the way to walk now, when the route has Show On Compass on.
public bool showRoute { get; set; }
PassForgeCompassBar.keepIndicatorsClear
Keep Off-screen Indicators from sliding under the bar.
public bool keepIndicatorsClear { get; set; }
PassForgeCompassBar.matchColorVision
Adjust marker colors for the player's color blindness setting on Screen Space - Overlay canvases.
public bool matchColorVision { get; set; }
PassForgeCompassBar.heading
The heading the bar shows, in degrees clockwise from north, from 0 to 360.
public float heading { get; }
PassForgeCompassBar.shownMarkers
How many objects and pings the bar showed when it was last refreshed.
public int shownMarkers { get; }
PassForgeCompassBar.Refresh()
Updates the bar now instead of just before the canvases draw.
public void Refresh()
PassForgeHud
Settings every Pass Forge HUD piece shares: the Off-screen Indicators' distances, Compass Bars and the rings of Fog of War Radars.
public static class PassForgeHud
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeHud.distanceUnit
The unit distances are written in, Meters unless set. A Volume's Off-screen Indicators override sets it too while its Distance Unit is ticked.
public static DistanceUnit distanceUnit { get; set; }
PassForgePanel
Turns any UI Image or other UI graphic into a window onto the game behind it, for pause menus, dialogs and HUD panels: frosted glass, or the scene in a style such as black and white, thermal or night vision. Each panel sets its own blur, and draws rounded corners, a border and a shadow with no sprite. Turn its object on and off to show and hide it.
public sealed class PassForgePanel : MonoBehaviour, IMeshModifier, IMaterialModifier
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > PF Panel.
PassForgePanel.style
What the panel shows the scene behind it as.
public PanelStyle style { get; set; }
PassForgePanel.styleStrength
How much of the style shows, from 0 to 1.
public float styleStrength { get; set; }
PassForgePanel.refraction
How strongly Liquid Glass bends the scene near its edges, from 0 to 1.
public float refraction { get; set; }
PassForgePanel.dispersion
How far Liquid Glass splits the scene's colors where it bends, from 0 to 1.
public float dispersion { get; set; }
PassForgePanel.bevel
How far in from its edge Liquid Glass bends, in the canvas's units.
public float bevel { get; set; }
PassForgePanel.glint
How much light Liquid Glass catches along its top edge, from 0 to 1.
public float glint { get; set; }
PassForgePanel.pixelSize
Size of the pixels for the Pixelate style, in screen pixels.
public float pixelSize { get; set; }
PassForgePanel.blur
How blurred the scene behind the panel is, from 0, clear, to 1, fully frosted.
public float blur { get; set; }
PassForgePanel.tint
Color laid over the scene.
public Color tint { get; set; }
PassForgePanel.brightness
Brightness of the scene behind the panel.
public float brightness { get; set; }
PassForgePanel.grain
Fine grain on the glass.
public float grain { get; set; }
PassForgePanel.shape
What shapes the panel: the graphic's sprite, or the panel's own rounded rectangle.
public PanelShape shape { get; set; }
PassForgePanel.cornerRadius
Radius of the rounded rectangle's corners, in the canvas's units.
public float cornerRadius { get; set; }
PassForgePanel.borderWidth
Width of the light edge around the rounded rectangle. Zero draws none.
public float borderWidth { get; set; }
PassForgePanel.borderColor
Color of the edge. Alpha sets how strong it is.
public Color borderColor { get; set; }
PassForgePanel.shadowColor
Color of the shadow under the rounded rectangle. An alpha of zero draws none.
public Color shadowColor { get; set; }
PassForgePanel.shadowSoftness
How far the shadow spreads and softens, in the canvas's units.
public float shadowSoftness { get; set; }
PassForgePanel.shadowOffset
Where the shadow falls, in the canvas's units.
public Vector2 shadowOffset { get; set; }
PassForgePanelBackdrop
Asks for the copies of the scene behind the UI that the Pass Forge/UI/Panel shader reads: a strongly blurred one as _PassForgeBlurredScene, a softly blurred one as _PassForgeSoftBlurredScene and, only while a panel asks for it, a sharp one as _PassForgeSharpScene. PF Panels ask by themselves; call these from custom UI. A custom shader maps its screen position into the copies with _PassForgeSceneTransform: when x is above zero, uv * xy + zw, which lines them up when the camera fills only part of the screen.
public static class PassForgePanelBackdrop
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgePanelBackdrop.textureName
Name of the global texture holding the strongly blurred scene.
public const string textureName = "_PassForgeBlurredScene"
PassForgePanelBackdrop.softTextureName
Name of the global texture holding the softly blurred scene.
public const string softTextureName = "_PassForgeSoftBlurredScene"
PassForgePanelBackdrop.sharpTextureName
Name of the global texture holding the sharp scene, kept only while something asks for it.
public const string sharpTextureName = "_PassForgeSharpScene"
PassForgePanelBackdrop.isRequested
True while anything asks for the blurred scene.
public static bool isRequested { get; }
PassForgePanelBackdrop.isSharpRequested
True while anything asks for the sharp scene as well.
public static bool isSharpRequested { get; }
PassForgePanelBackdrop.alwaysOn
Keeps the blurred scene updated even when nothing asks for it.
public static bool alwaysOn { get; set; }
PassForgePanelBackdrop.AddRequest()
Starts asking for the blurred scene. Pair every call with RemoveRequest.
public static void AddRequest()
PassForgePanelBackdrop.RemoveRequest()
Stops asking for the blurred scene.
public static void RemoveRequest()
PassForgePanelBackdrop.AddSharpRequest()
Starts asking for the sharp scene too, for glass that is barely blurred. It costs a full size copy of the picture. Pair every call with RemoveSharpRequest.
public static void AddSharpRequest()
PassForgePanelBackdrop.RemoveSharpRequest()
Stops asking for the sharp scene.
public static void RemoveSharpRequest()
DistanceUnitParameter
A Volume parameter holding a DistanceUnit.
public sealed class DistanceUnitParameter : VolumeParameter<DistanceUnit>
Namespace PassForge.Effects, assembly PassForge.Runtime.
new DistanceUnitParameter(DistanceUnit, bool)
Creates the parameter.
public DistanceUnitParameter(DistanceUnit value, bool overrideState = false)
DamageNumberKind
What a damage number shows, which sets its color and how it pops.
public enum DamageNumberKind
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Damage | A hit. Warm white. |
Critical | A critical hit: bigger, pops twice as much, shows longer and never adds up with other hits. |
Heal | Healing, always with a plus. Green. |
Blocked | A blocked or absorbed hit. Blue. |
Miss | A miss or a dodge. Gray. |
Gain | Gold, experience or anything gained, always with a plus. Gold. |
DamageNumberMotion
How damage numbers move.
public enum DamageNumberMotion
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Rise | Floats up and slows down. |
Arc | Thrown up and out to one side, the other side from the last number over the same object, then falls back past where it started as it fades. While hits keep adding up into it, it waits at the top. |
Still | Pops where it is and rises only a little. |
DamageNumberFormat
How long numbers are written.
public enum DamageNumberFormat
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Grouped | With a comma every three digits, as 12,345. |
Plain | Digits only, as 12345. |
Short | Shortened from 1,000, as 12.3K. |
OffScreenNumbers
What damage numbers outside the camera's picture do.
public enum OffScreenNumbers
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Hide | Not drawn while outside the picture or behind the camera, though they keep aging. |
KeepAtEdge | Held just inside the screen's edge and the phone's safe area. A number behind the camera shows at the edge on its side, the way Off-screen Indicators point. |
MarkerShape
Shape a ground marker paints.
public enum MarkerShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Circle | A filled circle. |
Ring | A ring, such as a selection circle. |
Cone | A cone opening along the object's forward direction. |
Line | A strip running along the object's forward direction. |
Square | A filled square. |
IndicatorShape
What an Off-screen Indicator draws at the edge of the screen.
public enum IndicatorShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Arrow | A solid arrow pointing toward the object. |
Chevron | An open chevron pointing toward the object. |
Icon | Your own icon, such as a skull or a star, with a small tip pointing toward the object. |
PingShape
The sign in a ping's middle on Compass Bars and Fog of War Radars, so the player reads what it means.
public enum PingShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Ring | The ring alone. |
Warning | A triangle with an exclamation mark, for an alarm or a danger. |
Enemy | A cross, for an enemy spotted. |
Ally | A solid dot, for an ally or a friendly unit. |
Help | A plus, for a call for help or a healer. |
Objective | A diamond, for an objective or a place to go. |
Sound | Sound waves, for a noise, music or a voice heard there. |
Icon | An icon of the game's own, given with the ping, sharing the eight icons Off-screen Indicators draw from. Without one, or with all eight taken, it shows as Ring. |
RouteDestination
Where a PassForgeRoute leads.
public enum RouteDestination
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Target | An object, such as the one with the objective's Off-screen Indicator. The route follows it as it moves. |
Point | A place in the world. |
NearestOfList | The nearest of the Targets list still standing, such as crystals to collect: one switched off, destroyed or arrived at is left out, and the route goes on to the next nearest. |
ListInOrder | The Targets list in order, such as the steps of a quest: arriving at one, or it being switched off or destroyed, moves on to the next. |
NearestWithTag | The nearest object with the Target Tag still standing, so objectives spawned in play are found with no list. One arrived at is left out. |
RoutePathing
How a PassForgeRoute finds its path.
public enum RoutePathing
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Auto | The NavMesh when there is one near the player, otherwise a straight line. |
NavMesh | Always the NavMesh. Needs the AI Navigation package. |
Straight | A straight line from the player to the destination. |
Waypoints | The Waypoints in order, from the nearest one ahead, then the destination. |
Points | The points a script hands to PassForgeRoute.SetPath(Vector3[], int), such as from its own pathfinder. |
RouteFogRule
What a PassForgeRoute does where the Fog of War has not been explored.
public enum RouteFogRule
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
StopAtUnexplored | The route stops where the fog has never been explored, so it never gives the map away. |
ShowThroughUnexplored | The whole route shows, over the fog too. |
RouteStyle
How a PassForgeRoute's line looks.
public enum RouteStyle
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Arrows | Arrows flowing toward the destination. |
Line | A solid line. |
Dashes | Dashes flowing toward the destination. |
RouteNoPath
What a PassForgeRoute shows when the NavMesh has no path to the destination.
public enum RouteNoPath
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Hide | No route. |
StraightLine | A straight line to the destination. |
RouteStatus
What a PassForgeRoute found when it last looked.
public enum RouteStatus
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
NoDestination | There is nowhere to go: no destination is set, or Points From Script has no points yet. |
Complete | A path that reaches the destination, or the points a script gave. |
Partial | A NavMesh path that ends as close as it can get, such as before a locked door. It still shows. |
Straight | A straight line or the waypoints, which do not know where walls are. |
NoPath | The NavMesh has no path: the player or the destination is too far from it, or nothing connects them. With When No Path set to Straight Line a straight line shows. |
Arrived | The player is at the destination. |
CompassPlane
Which plane a Compass Bar reads directions on. Auto comes first, so the numbers differ from those of FogOfWarPlane: scripts should use the names, not cast numbers.
public enum CompassPlane
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Auto | XY for an orthographic camera that looks along the world's Z axis, the ground otherwise. |
Ground | Directions on the ground, north along the world's Z axis. |
XY | Directions on the screen's plane, north up, for top down 2D games. |
CompassDistance
When a Compass Bar writes how far away each object is.
public enum CompassDistance
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Never | Never. |
LikeTheirIndicator | As each Off-screen Indicator's Show Distance says. |
Always | For every object. |
CompassShape
The shape of a Compass Bar.
public enum CompassShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Flat | A straight strip with its marks evenly spaced. |
Curved | A band that wraps around in front of the player: its marks crowd toward its ends, which bend down. |
CompassMarkerRow
Where a Compass Bar shows its markers.
public enum CompassMarkerRow
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
OnTheStrip | Over the letters and ticks, with their distances under them. |
BelowTheStrip | In a row of their own under the strip, the two splitting the bar in half, with their distances beside them. |
DistanceUnit
The unit Pass Forge's HUD writes distances in.
public enum DistanceUnit
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Meters | Meters, such as 125m. |
Feet | Feet, such as 410ft. |
PanelStyle
What a PF Panel shows the scene behind it as.
public enum PanelStyle
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Frosted | The scene as it is, blurred as much as the panel's Blur: frosted glass. |
BlackAndWhite | The scene in black and white. |
Sepia | The scene in old photo browns. |
Pixelate | The scene in big pixels. |
Thermal | The scene as a heat camera sees it. |
NightVision | The scene through green night vision, with noise and lines. |
Hologram | The scene as a flickering blue hologram with moving lines. |
Negative | The scene with its colors inverted. |
LiquidGlass | Clear glass that bends the scene near its edges, splits its colors there and catches light along its top, like liquid glass. It bends at the edges of the Rounded Rectangle shape. |
PanelShape
What shapes a PF Panel.
public enum PanelShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Sprite | The graphic's sprite, for panels of any shape. |
RoundedRectangle | A rectangle with rounded corners, a border and a shadow, which the panel draws with no sprite. |