Juice Kit: Installation & Overview
Juice Kit is 24 C# scripts plus two Shaders (each with a Unity .meta file). Everything is generated programmatically—no assets, Prefabs, or paid plugins required. All other juice-* skills teach you how to use these scripts.
Installation Steps
- Locate the Unity project root: the folder containing both
Assets/andProjectSettings/. - Check if already installed: if
Assets/Juice/Juice.csexists, read itsVersion. If it matches this skill's version (1.0.1), no reinstallation is needed—stop here. - Copy contents: copy everything inside this skill's
unity/Juice/folder into the project'sAssets/Juice/, preserving subfoldersUI,Resources,Demo,Editorand all.metafiles. Use the same command for first-time install and updating an older version; existing files will be overwritten:- macOS, Linux:
mkdir -p "<project>/Assets/Juice" && cp -R "<path to this skill>/unity/Juice/." "<project>/Assets/Juice/" - Windows PowerShell:
New-Item -ItemType Directory -Force "<project>\Assets\Juice" | Out-Null; Copy-Item -Recurse -Force "<path to this skill>\unity\Juice\*" "<project>\Assets\Juice\" - The trailing
/.and\*on the source are critical: without them, ifAssets/Juicealready exists, contents get copied intoAssets/Juice/Juice, causing duplicate scripts and build failures. After copying, verify thatAssets/Juice/Juice/does not exist. - If this skill's folder doesn't contain
unity/Juice, fetch it from GitHub:git clone --depth 1 https://github.com/yayapipi/unity-juice-skills, source isskills/juice-kit/unity/Juice.
- macOS, Linux:
- Check for uGUI: if
Packages/manifest.jsondoes not havecom.unity.ugui, deleteAssets/Juice/UI/andAssets/Juice/UI.meta(the two files inside require Unity UI). - Wait for Unity to compile, ensure no errors in the Console. If you have tools to read the Console (Unity CLI, Unity MCP), read it yourself; otherwise, ask the user to switch back to Unity and check.
- Report: tell the user where it was installed, and that they can use the menu
Tools ▸ Juice ▸ Create Demo Sceneto see a demo.
The .meta files contain fixed GUIDs and must be copied along: scenes and Prefabs rely on those GUIDs to find components like JuiceFeedback and JuiceButton. Without them, updating the Kit later will cause Missing Script errors on those components. The Assets/Juice folder's own .meta file is generated by Unity.
When Project Scripts Are in asmdef
Juice Kit compiles into Assembly-CSharp by default; scripts inside an asmdef cannot reference it. Only in this case: add a JuiceKit.asmdef in Assets/Juice/ (references: add UnityEngine.UI), and an Editor-only JuiceKit.Editor.asmdef in Assets/Juice/Editor/ (references: add JuiceKit), then have your project's asmdef reference JuiceKit. If the project does not use asmdef, do not add any.
What's Inside
| Class | One-Liner | Most Common One-Liner |
|---|---|---|
Juice | One-line recipes for common events | Juice.Hit(enemy.gameObject, hitPoint); |
JuiceShake | Camera shake, recoil, zoom | JuiceShake.Add(0.4f); |
JuiceTime | Hit stop, slow motion | JuiceTime.HitStop(0.06f); |
JuiceSquash | Squash, stretch, punch | JuiceSquash.Squash(transform); |
JuiceFlash | White flash | JuiceFlash.Play(gameObject); |
JuiceBurst | Sparks, dust, explosions, confetti | JuiceBurst.Spark(point); |
JuiceTrail | Motion trail | JuiceTrail.Attach(gameObject, Color.cyan); |
JuiceSfx | Random pitch, combo scales, built-in synth sounds | JuiceSfx.Blip(JuiceBlip.Jump); |
JuiceFloatingText | Damage numbers, floating text | JuiceFloatingText.Spawn(point, "12"); |
JuiceFeedback | Combines all above in one component, tweak in Inspector | feedback.PlayAt(point); |
JuiceButton | UI button hover, press, release | Attach to button |
JuiceCounter | Score rolling | counter.Set(score); |
JuicePop | Pop-in on object spawn | Attach to object |
JuiceTypewriter | Dialogue text appearance | typewriter.Play(line); |
JuiceFade | Fade in/out transitions | JuiceFade.LoadScene("Level2"); |
JuiceJumpAssist | Coyote time, jump buffer | Put in character controller |
JuiceFollowCamera | Damped camera follow, look-ahead, dead zone | Attach to camera |
JuiceSettings | Toggle shake & flash for players | JuiceSettings.ScreenShake = false; |
JuiceEase, JuiceRunner | Easing curves and minimal tweening | JuiceRunner.Tween(0.3f, e => ...); |
All static feedback calls automatically create required objects (camera components, particle systems, AudioSource) at runtime—no need to place anything in the scene beforehand. Calling them in edit mode (not Play) does nothing and causes no errors.
What's Inside a One-Line Recipe
| Recipe | Equivalent Lines |
|---|---|
Juice.Hit(target, point, power) | JuiceTime.HitStop(0.06f * power), JuiceShake.Add(0.3f * power), JuiceFlash.Play(target), JuiceSquash.Punch(target.transform, 0.15f * power), JuiceBurst.Spark(point), JuiceSfx.Blip(JuiceBlip.Hit) |
Juice.Hurt(target, power) | HitStop(0.1f * power), Add(0.5f * power), JuiceFlash.Play(target, red, 0.1f), JuiceSquash.Squash(target.transform, 0.2f * power), Blip(Hurt) |
Juice.Jump(transform) | JuiceSquash.Stretch(transform, 0.22f), JuiceBurst.Dust(feet), Blip(Jump, 0.4f) |
Juice.Land(transform, impact) | JuiceSquash.Squash(transform, 0.25f * impact), JuiceBurst.Dust(feet), Blip(Land, 0.4f); add Add(0.12f * impact) if impact >= 1.5 |
Juice.Pickup(position, color, text) | JuiceBurst.Spawn(position, color, 8, 4f, 0.14f, 0.35f), Blip(Pickup); add JuiceFloatingText.Spawn if text is provided |
Juice.Coin(position, combo) | JuiceBurst.Spawn(position, gold, 6, 3.5f, 0.12f, 0.3f), JuiceSfx.PlayCombo(coinSound, combo, 0.45f) |
Juice.Explode(position, power) | HitStop(0.12f * power), Add(0.6f * power), JuiceShake.Zoom(0.04f * power, 0.3f), JuiceBurst.Explosion(position, null, power), Blip(Explosion, 0.6f) |
Juice.Win(position) | JuiceBurst.Confetti(position), Blip(PowerUp), JuiceTime.SlowMo(0.4f, 0.4f), JuiceShake.Zoom(0.06f, 0.5f) |
Juice.Lose() | Blip(Lose), JuiceTime.SlowMo(0.3f, 0.6f), JuiceShake.Add(0.5f) |
If the user wants something different (e.g., shorter hit stop, no shake), replace the recipe line with the individual lines from the table, then adjust numbers or remove lines.
Two Must-Know Things
- Transformations only apply to safe objects.
JuiceSquash.Squash,Stretch,Punch(and the recipesJuice.Jump,Land,Hit,Hurtthat use them) automatically choose the target:- If the character's graphics are on a child object: only that child object is transformed; the collider is unaffected.
- If graphics and a "gravity-affected rigidbody" (Dynamic Rigidbody or CharacterController) are on the same object: no transformation is performed, a one-time Console warning is logged, and other feedback runs normally. Scaling such an object would move the collider and ground detection points, causing the character to float or repeatedly trigger landing.
- In the second case: if you can edit the scene, move the graphic (Sprite or model) to a child object; otherwise, tell the user in your response to do so for squash and stretch to work.
Juice.Hit,Hurt,Explode,Win,LosemodifyTime.timeScale(hit stop or slow motion). If the project has a pause menu, addJuiceTime.Cancel();before entering pause; seejuice-hit-stopfor details.
Demo Scene
- Human: Menu
Tools ▸ Juice ▸ Create Demo Scene, press Play, then toggle feedback on/off with the switches on the left. - AI Agent: Call
JuiceMenu.AddDemoToScene();(no dialog), then enter Play mode.
Accessibility
Some players experience discomfort from screen shake or flashing. Juice Kit includes three built-in settings that auto-save:
JuiceSettings.ScreenShake = false; // Turns off shake, recoil, zoom
JuiceSettings.Flashes = false; // Turns off white flashes
JuiceSettings.Intensity = 0.5f; // Overall intensity 0–1
If the project has a settings menu, proactively suggest hooking these up.
Rules
- To adjust feel, change the numbers passed at call time or fields in the Inspector—do not modify files inside
Assets/Juice/; future Kit updates will overwrite everything. - Recommended Unity 2022.3+. Tested on Unity 6 (6000.5) URP and Built-In pipeline.