Scripting
Things to know
Each item quotes the message the Console or an inspector shows, so a warning can be matched to its fix.
Setup and cameras
- Set Up Effects. Run Tools > Pass Forge > Set Up Effects once per project. Until then, effect inspectors say "Pass Forge effects are not set up on the active pipeline, so no screen look shows yet." This includes the effects that need no Volume, such as Shockwave, Screen Shake, Transition and Screen Flash.
- Post Processing on the camera. "Screen effects only show on cameras with Post Processing on. It is off on …" Switch on Post Processing on the camera, as URP's own Volume effects need. A camera made by a script needs it too; see the example above.
Volumes and profiles
- Make Editable Copy. Shipped profiles are read only: "Shipped profiles are read only; make an editable copy to change one." Choose one and use Make Editable Copy to adjust it.
- Drive
volume.profile. It is a private copy, so the asset on disk is left alone. Never change the default profile or asharedProfilewhile the game runs, and destroy the copy when you are done with it. A Highlight'sUniqueProfilegives one object its own copy the same way. Overrideand.value.Overridesets the value and marks it overridden. A Volume ignores a setting that is not overridden, so assigning.valuealone often changes nothing.- AgX and URP's tonemapper. The calls in
EffectPresetUtilitycopy Pass Forge effects only, so callEffectPresetUtility.MatchUrpTonemappingafter them, or set URP's Tonemapping yourself. - Effect Mask. Most effects have a Mask setting. These 23 always cover the whole screen: ASCII, CRT, VHS, Retro, Pixelate, Glitch, Old Film, Halftone, Sketch, Watercolor, Painterly, Kaleidoscope, Distortion, Radial Blur, Scan Pulse, Vision, Motion Trails, Feedback, Transition, Panel Backdrop, Color Vision, AgX Tonemapping and Deband. Their inspector says "This effect always covers the whole screen: a Pass Forge Effect Mask does not limit it." A mask with no look that reads it shows in the Overview as "Pass Forge Effect Mask is on … objects, but no look reads masks, so they change nothing."
Builds
- Always Include. A build leaves out effects no profile in it uses. An effect that only a script adds or turns up does nothing in the build until you tick it under Project Settings > Pass Forge > Always Include. Play Mode warns about it: "Pass Forge: … shows in Play Mode, but a player build leaves it out, because no Volume Profile in the build holds it. Turned on from a script, it would do nothing in the build." A build logs "Pass Forge leaves effects no profile in this build uses out of it: …".
- Dissolve, Occluder Fade and Cross Section added from scripts. "Pass Forge: this build does not have the … shader that Dissolve, Occluder Fade and Cross Section draw with" means none of them is placed in a scene of the build. Tick Dissolve, Occluder Fade And Cross Section Added From Scripts under Project Settings > Pass Forge.
- Skinned afterimages. "… has Read/Write turned off, so a build cannot record its pose for ghosts standing in the world." Turn on Read/Write in the model's import settings.
- Custom nodes and IL2CPP. IL2CPP strips a custom node's class: add a
link.xmlunder Assets that preserves the assembly your node lives in.
Moments
- Play Mode only. A moment plays in Play Mode;
Play()in Edit Mode does nothing. A switched off moment says "Pass Forge Moment on … is disabled, so it does not play."PassForgeMoment.PlayNamedplays enabled moments only. - Scene unloads. A moment that has started plays to the end even when its object is destroyed. When its scene unloads, though, its steps that have not started yet are dropped; steps already playing finish, and a Reveal step still lifts a cover that is on.
- Cooldown, Chance and Max Plays hold back the whole play, so a Damage Number step shows no number for a hit they skip.
- Step components start switched off. An Afterimage Burst or a Highlight For Seconds step whose component is on says "… is switched on, so the step leaves it as it is. Switch the component off in the scene; the step switches it on for its seconds."
- Two moments on one object. Dragging the object into a field picks the first one. Drag the component itself, or play the moment by name.
MomentPresetUtilityis editor-only.MomentPresetUtility.Applyfills a moment with a ready made one from your own editor scripts; it is not in player builds. At runtime, build steps withMomentStep.For, or keep a configured moment in the scene and play it by name.
Transitions and scenes
- A cover stays on through a scene load until something calls
PassForgeTransition.Reveal. After loading a scene under a cover of your own, reveal it from that scene, callPassForgeTransition.RevealLeftoverCoverfrom Start in a scene that never covers the screen itself, or callPassForgeTransition.Stopto take the cover off at once. - The scene list. "Pass Forge cannot load the scene "…": it is not in the build's scene list. Add it in File > Build Profiles, under Scene List."
- Blood stays on the lens across a scene load and a respawn until it fades. Call
PassForgeLensBlood.Wipe. - A swapped graph stays on the renderer asset after Play Mode ends. Put the old graph back in OnDisable.
Screen Looks, highlights and fog
- From Script. A Screen Look's Activation decides when it shows: "From Script waits for Play, PlayFor or a UnityEvent." With When Enabled or Inside Area, the look shows by itself.
- Highlight Trigger. The trigger decides when the highlight shows, so the Highlight starts off in Play Mode.
- Fill shows only when the profile's Fill is switched on. Setting
fillAmountgives the object its own copy of the profile. - A fog switched off releases its map, which then reports every place as hidden. Check
isActiveAndEnabledbeforeIsVisible. - Visible Teams keeps what was explored before it changed: call
ResetExploredafter setting it. - One route shows at a time: the one enabled last.
PassForgeRoute.currentis null when there is none.
Interface, input and time
- uGUI components. PF Panel, Compass Bar, Fog of War Minimap, Fog of War Radar and Accessibility Menu need the Unity UI package (
com.unity.ugui). Without it they are left out of the package's assemblies, so a script that names them does not compile. - PF Panel needs a Screen Space - Overlay canvas. On another canvas, its inspector says "This canvas draws with the camera, before Pass Forge copies the picture, so the panel can show a blurred copy of itself and its text. Put panels on a Screen Space - Overlay canvas."
- Input.
UnityEngine.Inputthrows in a project set to the Input System package only. Read input through#if ENABLE_INPUT_SYSTEM, as the hover example does, or call the examples' methods from your own input code. - Pause and time. Moments count delays and cooldowns in real time by default, and transitions, damage numbers and the VHS rewind run on real time too, so they keep playing while
Time.timeScaleis 0. Hit stops and slow motion follow a pause menu that sets the time scale. PutTime.timeScaleback to 1 when a paused scene ends. - Damage number values. "Pass Forge Damage Numbers skipped a value that is not a number or is infinite, so nothing showed for it." Text shows up to 12 characters: letters, digits and
+ - . , % ! /. - Colors passed to calls such as
Spawn,Flash,SplatandCoverwork like material colors: in a Linear project they are made linear before they reach the shaders. Do not convert them yourself.