API
One-line effects
Static calls that need no reference, and the components behind them.
PassForgeScreenShake
Shakes the picture without moving the camera, so physics, aiming and the interface stay steady: for hits, explosions and landings. Shakes add up and fade out on their own. The Screen Shake effect draws them with no Volume needed, and a Volume can restyle them or add a constant rumble.
public static class PassForgeScreenShake
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeScreenShake.trauma
How strong the shake is right now, from 0 to 1.
public static float trauma { get; }
PassForgeScreenShake.Shake(float, float)
Adds a shake.
public static void Shake(float amount = 0.5f, float duration = 0.4f)
PassForgeScreenShake.Stop()
Stops the shake at once.
public static void Stop()
PassForgeDamageIndicator
Shows where hits come from: an arc, an arrow or a glow at the edge on the side of the screen a hit came from, fading over a second or so, turning as the player turns. Up to eight show at once; a new one replaces the oldest. The Damage Direction effect draws them with no Volume needed, and a Volume can restyle them.
public static class PassForgeDamageIndicator
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeDamageIndicator.maxHits
Most hits that show at once.
public const int maxHits = 8
PassForgeDamageIndicator.activeCount
Hits still showing.
public static int activeCount { get; }
PassForgeDamageIndicator.center
Who is hit, whose turning the directions follow. Empty uses the object tagged Player, or the camera when there is none.
public static Transform center { get; set; }
PassForgeDamageIndicator.Show(Vector3, float, float)
Shows that a hit came from a point in the world.
public static void Show(Vector3 from, float strength = 1f, float seconds = 1.2f)
PassForgeDamageIndicator.Show(Transform, float, float)
Shows that a hit came from an attacker, following it while the hit shows.
public static void Show(Transform attacker, float strength = 1f, float seconds = 1.2f)
PassForgeDamageIndicator.Clear()
Clears every hit at once, such as when the player respawns.
public static void Clear()
PassForgeLensBlood
Blood on the camera lens where a hit came from: a splat lands, runs down a little, dries darker and duller, then fades, and the picture bends through it. SplatFrom(Vector3, LensBloodSplat, float) lands it where a point is on screen, or on the edge of its side when the camera does not see it; SplatOnEdge(Vector3, LensBloodSplat, float) lands it on the edge of the side a hit came from, for the player being hit; Splat(LensBloodSplat, float) lands it anywhere off the middle. Up to eight splats show at once, and hits landing close together pile into one. No Volume and no texture art are needed, and a Pass Forge Moment with a Lens Blood step lands it without code. On the camera, this component sets how the blood looks: the one enabled last shows, and a Lens Blood override in a Volume takes over, blending from it. Players can turn blood off or make it not red with PassForgeAccessibility.blood.
public sealed class PassForgeLensBlood : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Lens Blood.
PassForgeLensBlood.maxSplats
Most splats on the lens at once. Hits landing close together pile into one splat.
public const int maxSplats = 8
PassForgeLensBlood.activeCount
Splats on the lens now.
public static int activeCount { get; }
PassForgeLensBlood.current
The Lens Blood enabled last, whose look shows, or null for the default look.
public static PassForgeLensBlood current { get; }
PassForgeLensBlood.color
Color of the liquid. Alpha sets how much it hides the picture behind it.
public Color color { get; set; }
PassForgeLensBlood.size
Size of every splat, times the size of the hit, from 0.25 to 3.
public float size { get; set; }
PassForgeLensBlood.seconds
Seconds a splat stays on the lens before it has faded, from 1 to 30.
public float seconds { get; set; }
PassForgeLensBlood.drip
How far splats run down the lens, from 0 to 1.
public float drip { get; set; }
PassForgeLensBlood.dries
How much splats darken and lose their shine as they dry, from 0 to 1.
public float dries { get; set; }
PassForgeLensBlood.refraction
How much the picture bends through the liquid, from 0 to 1.
public float refraction { get; set; }
PassForgeLensBlood.gloss
Wet shine on fresh splats, from 0 to 1.
public float gloss { get; set; }
PassForgeLensBlood.keepMiddleClear
How far from the middle of the screen splats land, as a share of its shorter side, from 0 to 0.5, so the crosshair stays readable. Strong hits and piled blood do not grow a splat over the middle; drops, drips and large splats can still reach it. A Shot In The Face still lands in the middle. Zero lets blood land anywhere.
public float keepMiddleClear { get; set; }
PassForgeLensBlood.tonedDownColor
Color red splats take when the player sets PassForgeAccessibility.blood to Not Red. Green alien blood, oil and paint keep their own colors.
public Color tonedDownColor { get; set; }
PassForgeLensBlood.UseLiquid(LensBloodLiquid)
Fills the look with a ready liquid: its color, drying, shine, drip and refraction. Size and Seconds stay.
public void UseLiquid(LensBloodLiquid liquid)
PassForgeLensBlood.SplatHit()
Lands a Hit splat anywhere off the middle, for a UnityEvent such as the player's On Damaged.
public void SplatHit()
PassForgeLensBlood.SplatHeavyHit()
Lands a Heavy Hit splat anywhere off the middle, for a UnityEvent.
public void SplatHeavyHit()
PassForgeLensBlood.WipeLens()
Wipes the lens clean, for a UnityEvent such as a heal or a respawn.
public void WipeLens()
PassForgeLensBlood.Splat(LensBloodSplat, float)
Lands blood somewhere on the lens, off the middle, or in the middle for a Shot In The Face.
public static void Splat(LensBloodSplat splat = LensBloodSplat.Hit, float strength = 1f)
PassForgeLensBlood.Splat(LensBloodSplat, float, Color)
Lands blood of a color of its own somewhere on the lens, off the middle.
public static void Splat(LensBloodSplat splat, float strength, Color color)
PassForgeLensBlood.SplatFrom(Vector3, LensBloodSplat, float)
Lands blood from a point in the world: where it is on screen when the main camera sees it, kept off the middle, else on the edge of the lens on its side, as Damage Direction shows it.
public static void SplatFrom(Vector3 worldPoint, LensBloodSplat splat = LensBloodSplat.Hit, float strength = 1f)
PassForgeLensBlood.SplatFrom(Vector3, LensBloodSplat, float, Color)
Lands blood of a color of its own from a point in the world.
public static void SplatFrom(Vector3 worldPoint, LensBloodSplat splat, float strength, Color color)
PassForgeLensBlood.SplatOnEdge(Vector3, LensBloodSplat, float)
Lands blood on the edge of the lens on the side a hit came from, measured from the player as Damage Direction measures it, so the two always agree: for the player being hit.
public static void SplatOnEdge(Vector3 from, LensBloodSplat splat = LensBloodSplat.Hit, float strength = 1f)
PassForgeLensBlood.SplatOnEdge(Vector3, LensBloodSplat, float, Color)
Lands blood of a color of its own on the edge of the lens on the side a hit came from.
public static void SplatOnEdge(Vector3 from, LensBloodSplat splat, float strength, Color color)
PassForgeLensBlood.SplatAt(Vector2, LensBloodSplat, float)
Lands blood at a point on screen, kept off the middle: 0 to 1 across and up the screen, outside it for the edge, so (0, 0.5) lands on the left edge.
public static void SplatAt(Vector2 viewportPoint, LensBloodSplat splat = LensBloodSplat.Hit, float strength = 1f)
PassForgeLensBlood.SplatAt(Vector2, LensBloodSplat, float, Color)
Lands blood of a color of its own at a point on screen.
public static void SplatAt(Vector2 viewportPoint, LensBloodSplat splat, float strength, Color color)
PassForgeLensBlood.Wipe(float)
Wipes the lens clean over the seconds, as on a heal or a respawn.
public static void Wipe(float seconds = 0.4f)
PassForgeLensBlood.Clear()
Clears the lens at once.
public static void Clear()
PassForgeScreenWarp
Bends the picture around this object: a gravity lens for black holes and portals, or heat shimmer rising from engines, fires and hot metal. Up to eight show at once. Each sets its own look and needs no Volume; a Volume setting that is overridden takes over the warps' own.
public sealed class PassForgeScreenWarp : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Screen Warp.
PassForgeScreenWarp.activeCount
Number of warps currently enabled.
public static int activeCount { get; }
PassForgeScreenWarp.mode
How the warp bends the picture.
public WarpMode mode { get; set; }
PassForgeScreenWarp.radius
Radius of the warp in world units.
public float radius { get; set; }
PassForgeScreenWarp.strength
How strongly the picture bends, from 0 to 1.
public float strength { get; set; }
PassForgeScreenWarp.darkening
Dark core at the middle of a lens, from 0 to 1.
public float darkening { get; set; }
PassForgeScreenWarp.heatSpeed
How fast heat shimmer rises, from 0 to 5.
public float heatSpeed { get; set; }
PassForgeScreenWarp.heatDetail
How fine the heat shimmer ripples are, from 1 to 60.
public float heatDetail { get; set; }
PassForgeScreenWarp.colorSplit
How far the color channels split where the picture bends, from 0 to 1.
public float colorSplit { get; set; }
PassForgeShockwaves
Starts shockwaves: rings of refraction that race out from a point in the world, for explosions, landings, shouts and pickups. Up to eight run at once; a new one replaces the oldest. The Shockwave effect draws them with no Volume needed, and a Volume can restyle them.
public static class PassForgeShockwaves
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeShockwaves.maxWaves
Most shockwaves that run at once.
public const int maxWaves = 8
PassForgeShockwaves.activeCount
Shockwaves still running.
public static int activeCount { get; }
PassForgeShockwaves.Spawn(Vector3, float, float, float)
Starts a shockwave.
public static void Spawn(Vector3 worldPosition, float radius = 6f, float duration = 0.8f, float strength = 1f)
PassForgeShockwaves.Clear()
Stops every shockwave.
public static void Clear()
PassForgeTether
Draws a beam, a lightning bolt or a chain on screen from this object to a target, for life links, lock ons, leashes and puzzle connections, and on to more targets after it for chain lightning. Up to eight links show at once. Strike(Vector3, Vector3, float) and ChainStrike flash bolts for a moment without a component. Needs no Volume; a Volume setting that is overridden takes over the tethers' own.
public sealed class PassForgeTether : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Tether.
PassForgeTether.maxBolts
Most bolts that flash at once; a new one replaces the oldest.
public const int maxBolts = 8
PassForgeTether.target
Object the tether reaches to.
public Transform target { get; set; }
PassForgeTether.thenTo
More objects the tether jumps on to after its target, one after another.
public List<Transform> thenTo { get; }
PassForgeTether.style
How the tether is drawn.
public TetherStyle style { get; set; }
PassForgeTether.color
Color of the tether.
public Color color { get; set; }
PassForgeTether.width
Width of the tether in pixels.
public float width { get; set; }
PassForgeTether.jitter
How far lightning bends off its straight path, from 0 to 1.
public float jitter { get; set; }
PassForgeTether.speed
How fast lightning jumps and a chain's links crawl, from 0 to 10.
public float speed { get; set; }
PassForgeTether.glow
How much light glows around the tether, from 0 to 1.
public float glow { get; set; }
PassForgeTether.activeCount
Number of enabled tethers that have a target, and bolts flashing.
public static int activeCount { get; }
PassForgeTether.Strike(Vector3, Vector3, float)
Flashes a bolt of lightning between two points for a moment, flickering as it fades, such as a strike from the sky, with no component needed.
public static void Strike(Vector3 from, Vector3 to, float seconds = 0.4f)
PassForgeTether.Strike(Vector3, Vector3, float, Color, float)
Flashes a bolt of lightning between two points for a moment, in a color and a width in pixels.
public static void Strike(Vector3 from, Vector3 to, float seconds, Color color, float width = 8f)
PassForgeTether.ChainStrike(Transform, IList<Transform>, float)
Chain lightning for a moment: a bolt from one object to the first target, then on from target to target, following them as they move, such as a spell arcing between enemies.
public static void ChainStrike(Transform from, IList<Transform> targets, float seconds = 0.5f)
PassForgeTether.ClearStrikes()
Ends every bolt at once.
public static void ClearStrikes()
PassForgeAfterimage
Leaves fading ghosts of an object behind it as it moves, drawn by the Afterimage node. In World, each ghost is recorded where the object stood and drawn there however the camera moves, which is what a third person camera following the object needs. On Screen keeps them on the picture instead, for a continuous smear. Sprite Renderers are recorded in World too, 2D Animation skinning included, so a 2D camera following a character leaves its trail behind in the level. Spine skeletons, sliced or tiled sprites, and skinned meshes whose model has Read/Write turned off, always leave their ghosts on the picture.
public sealed class PassForgeAfterimage : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Afterimage.
PassForgeAfterimage.space
Where the ghosts are kept: standing in the world, or on the picture.
public AfterimageSpace space { get; set; }
PassForgeAfterimage.color
Color of the ghosts. Alpha sets their strength.
public Color color { get; set; }
PassForgeAfterimage.blend
How ghosts combine with the picture.
public AfterimageBlend blend { get; set; }
PassForgeAfterimage.hueCycleSpeed
Turns around the color wheel per second. Zero keeps the color as set.
public float hueCycleSpeed { get; set; }
PassForgeAfterimage.fadeTime
Seconds until a ghost has faded to half.
public float fadeTime { get; set; }
PassForgeAfterimage.stampInterval
Seconds between ghosts. Zero leaves a continuous smear.
public float stampInterval { get; set; }
PassForgeAfterimage.minStampDistance
Distance the object must move before it leaves another ghost.
public float minStampDistance { get; set; }
PassForgeAfterimage.rim
Fade the middle of each ghost so its edges stand out.
public float rim { get; set; }
PassForgeAfterimage.rimPower
How tightly the rim hugs the edges.
public float rimPower { get; set; }
PassForgeAfterimage.hideUnderObject
Hide ghosts where the object currently is.
public bool hideUnderObject { get; set; }
PassForgeAfterimage.includeChildren
Also leave ghosts of the renderers on child objects.
public bool includeChildren { get; set; }
PassForgeAfterimage.ClearAll()
Removes every ghost on the next frame. Call it on a camera cut or a teleport, where old ghosts would no longer line up with anything.
public static void ClearAll()
PassForgeAfterimage.RefreshRenderers()
Gathers the renderers to draw again, after adding a renderer by hand or after changing a LOD Group's levels with LODGroup.SetLODs.
public void RefreshRenderers()
PassForgeHaptics
Vibrates the phone for hits and pickups the player feels in the hand: for a number of milliseconds at a strength. On Android the vibration lasts as long as asked, and phones that can set their strength follow it. iPhones buzz at their one strength for their own short time. Phones that cannot set their strength skip vibrations weaker than a quarter, so a far hit or one the player turned down leaves them still. Elsewhere, and in the Editor, nothing vibrates. The player's shake setting in PassForgeAccessibility scales it, as it scales PassForgeRumble, which rumbles gamepads.
public static class PassForgeHaptics
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeHaptics.canVibrate
True on a phone that can vibrate, in an Android or iOS build. False in the Editor and on other platforms, for an options menu that offers a vibration setting only where it does something.
public static bool canVibrate { get; }
PassForgeHaptics.Vibrate(int, float)
Vibrates the phone; a vibration meanwhile takes over on Android.
public static void Vibrate(int milliseconds, float strength = 1f)
PassForgeHaptics.Stop()
Stops a vibration under way, on phones that can. An iPhone's short buzz runs out by itself.
public static void Stop()
PassForgeRumble
Rumbles the player's gamepads, and vibrates the phone on Android and iOS, for hits and explosions. Gamepads need the Input System package. The player's shake setting in PassForgeAccessibility scales it. A phone buzzes at one fixed strength, so it only buzzes for strong rumbles, and at most a few times a second.
public static class PassForgeRumble
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeRumble.Play(float, float)
Rumbles for the seconds; a stronger or longer rumble meanwhile takes over.
public static void Play(float strength, float seconds)
PassForgeRumble.Stop()
Stops every rumble at once.
public static void Stop()
PassForgeDatamosh
Controls the Datamosh effect from scripts.
public static class PassForgeDatamosh
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeDatamosh.Keyframe()
Starts again from the current picture, like a video keyframe, so the smear clears. Call it on a beat or a cut; a Datamosh effect with an interval also does it by itself.
public static void Keyframe()
PassForgeVhsRewind
Plays the last moments of the picture backwards with a VHS rewind look, for time rewind mechanics, deaths and replays. Turn on recording first so there is something to rewind.
public static class PassForgeVhsRewind
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeVhsRewind.recording
Keeps the last one and a half seconds of the picture at a third of the resolution, ready to rewind. Costs sixteen small textures while on.
public static bool recording { get; set; }
PassForgeVhsRewind.isRewinding
True while a rewind plays.
public static bool isRewinding { get; }
PassForgeVhsRewind.Rewind(float)
Plays the kept pictures backwards over the given number of seconds.
public static void Rewind(float duration = 1.5f)
PassForgeVhsRewind.Stop()
Ends a rewind early.
public static void Stop()
PassForgeScreenFlash
Blinding flashes from scripts: lightning that lights up the scene and leaves silhouettes in the eye, and flashbangs that white out the screen and burn in the last picture. An aimed flashbang goes off at a point and blinds by where the player looks. Needs no Volume.
public static class PassForgeScreenFlash
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeScreenFlash.isFlashing
True while a flash or its afterimage shows.
public static bool isFlashing { get; }
PassForgeScreenFlash.blindness
How blinded the player is right now, from 0 to 1, after where they looked, Range and Blocked By. The player's flash setting and safe mode do not lower it, so turning flashes down gives no advantage. Zero for lightning.
public static float blindness { get; }
PassForgeScreenFlash.Lightning(float)
A lightning strike: a few quick flickers of light, then silhouettes that fade from the eye.
public static void Lightning(float strength = 1f)
PassForgeScreenFlash.Flashbang(float, float)
A flashbang: the screen whites out, then the last picture stays burned in while vision returns. It whites out the whole screen whichever way the camera looks; give a position for an aimed one. A flash that blinds less than what is left of the one showing leaves it alone.
public static void Flashbang(float strength = 1f, float seconds = 4f)
PassForgeScreenFlash.Flashbang(Vector3, float, float)
A flashbang going off at a point. It blinds fully when the main camera looks at it, far less from the side, and a tenth as much from behind, unless it is close by. With an orthographic main camera, or one looking steeply down as in top-down and isometric games, it blinds fully anywhere on screen. The white spreads from where it is on screen and leaves a dark spot there. Needs no Volume.
public static void Flashbang(Vector3 position, float strength = 1f, float seconds = 4f)
PassForgeScreenFlash.Flashbang(Vector3, float, float, float, LayerMask)
An aimed flashbang that also fades with distance and is stopped by walls, as a Moment's Range and Blocked By do. Walls need 3D colliders and the Physics module.
public static void Flashbang(Vector3 position, float strength, float seconds, float range, LayerMask blockedBy)
PassForgeScreenFlash.Stop()
Ends any flash at once.
public static void Stop()
PassForgeFlashLights
Brief flashes that light up nearby surfaces without adding real lights: explosions, muzzle flashes, spells and impacts. A cheap stand in for dynamic lights on phones. Up to eight flashes and Screen Lights show at once. Needs no Volume.
public static class PassForgeFlashLights
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeFlashLights.activeCount
Flashes still lighting the scene.
public static int activeCount { get; }
PassForgeFlashLights.Spawn(Vector3, Color, float, float, float)
Lights up surfaces around a point for a moment, fading out over its duration.
public static void Spawn(Vector3 position, Color color, float radius = 6f, float duration = 0.25f, float intensity = 2f)
PassForgeFlashLights.Clear()
Removes every flash at once.
public static void Clear()
PassForgeScreenLight
A cheap light that brightens nearby surfaces on screen without a real Light: torches, lamps, glowing pickups and campfires on phones. Shares the eight light budget with flashes from PassForgeFlashLights. Needs no Volume, but needs the camera depth and normals, so it does not show on the 2D Renderer.
public sealed class PassForgeScreenLight : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Screen Light.
PassForgeScreenLight.activeCount
Number of Screen Lights currently enabled.
public static int activeCount { get; }
PassForgeScreenLight.color
Color of the light.
public Color color { get; set; }
PassForgeScreenLight.radius
How far the light reaches, in meters.
public float radius { get; set; }
PassForgeScreenLight.intensity
Brightness of the light.
public float intensity { get; set; }
PassForgeScreenLight.flicker
How much the light flickers, from 0 to 1.
public float flicker { get; set; }
PassForgeShakeTrack
A Timeline track that shakes the picture for as long as its clips last, rising and falling with their ease, for earthquakes and engines. It shows while scrubbing in Edit Mode too.
public sealed class PassForgeShakeTrack : TrackAsset
Namespace PassForge.Timeline, assembly PassForge.Timeline. Timeline track: Pass Forge > Screen Shake Track.
PassForgeShakeClip
A clip that shakes the picture by an amount for its length.
public sealed class PassForgeShakeClip : PlayableAsset, ITimelineClipAsset
Namespace PassForge.Timeline, assembly PassForge.Timeline. Timeline track: Screen Shake.
PassForgeShakeClip.amount
How hard the picture shakes, from 0 to 1.
public float amount
LensBloodSplat
How blood lands on the lens from one hit.
public enum LensBloodSplat
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Graze | A sprinkle of small drops, for a graze or a light hit. |
Hit | One splat with drops around it and a couple of short drips. |
HeavyHit | A large splat with many drops and long drips. |
Spray | A fan of streaks and fine drops across one side, as from a close kill. |
ShotInTheFace | A burst over much of the lens with heavy drips, for the player shot point blank. |
LensBloodLiquid
A ready look for the liquid, picked with PassForgeLensBlood.UseLiquid.
public enum LensBloodLiquid
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Blood | Dark red blood that dries darker and duller. |
AlienBlood | Bright green blood for aliens and creatures. |
Oil | Glossy black oil for robots and machines. It never dries. |
Paint | Bright pink paint for paintball and family games. |
WarpMode
How a screen warp bends the picture.
public enum WarpMode
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Lens | Pulls the picture in around the object, like gravity bending light. |
Heat | Hot air shimmering up from the object. |
TetherStyle
How a tether is drawn.
public enum TetherStyle
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Beam | A glowing beam. |
Lightning | A crackling bolt of lightning. |
Chain | A dashed chain. |
AfterimageSpace
Where an afterimage keeps its ghosts.
public enum AfterimageSpace
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
World | Each ghost stays where the object was in the world, so a camera following the object passes around them and they trail behind it however the camera moves. |
Screen | Ghosts are kept on the picture, which is what a continuous smear needs, but a moving camera carries them along instead of leaving them behind in the world. |
AfterimageBlend
How afterimage ghosts combine with the picture.
public enum AfterimageBlend
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Additive | Add the ghost color on top, for a glowing, energy like trail. |
Tint | Paint the ghosts in a solid color. |