t1k:unity:rendering:feel-juice
| Field | Value |
|---|---|
| Module | rendering |
| Version | 5.39.1 |
| Effort | medium |
| Tools | — |
How to invoke
Section titled “How to invoke”/t1k:unity:rendering:feel-juice[feature-name | chaosforge | screen-shake | haptics | loot-toast]t1k:unity:rendering:feel-juice
Section titled “t1k:unity:rendering:feel-juice”MoreMountains Feel v5.9.1 integration guide for Unity 6 + DOTS-AI. Feel is Mono-only — never call from Burst/ISystem. Use the bridge pattern.
Decision Tree
Section titled “Decision Tree”| You want to… | Action |
|---|---|
| Decide if Feel is right for this feature | Decision Matrix (references/decision-matrix-feel-vs-dots-lib.md) |
| Wire Feel to DOTS events | Bridge Pattern (references/dots-bridge-pattern.md) |
| Raise a feedback cue from managed UI into the ECS simulation (input-ack from a presenter) | Managed UI → ECS Cue Bridge (references/managed-ui-to-ecs-cue-bridge.md) |
| Configure an MMF_Player | MMF_Player Anatomy (references/mmf-player-anatomy.md) |
| Add haptics on iOS/Android | NiceVibrations Guide (references/nice-vibrations-guide.md) |
| Debug a Feel integration | Hard rules (references/hard-rules.md) |
| See ChaosForge example | ChaosForge Integration (references/chaosforge-integration-example.md) |
Feedback channel → Unity mechanism
Section titled “Feedback channel → Unity mechanism”The engine-side implementation of rules/game-feedback-mandate.md (theonekit-designer, not installed in a Unity-only repo)‘s five
feedback channels — which Unity API/package each channel maps to, per
rules/game-feedback-mandate-unity.md:
| Channel | Canonical Unity mechanism | Owning skill |
|---|---|---|
visual | LitMotion tweens (LMotion.Create(...).BindTo…) on the actor’s transform/color/scale for state changes. DOTween is banned kit-wide — do not reach for it even if present in the project. | t1k-unity-animation-litmotion |
vfx | VFX Graph (com.unity.visualeffectgraph) for GPU-simulated, high-count effects (fire, magic, debris); legacy ParticleSystem for simple mobile-friendly bursts on low-end GPUs. Sequencing/triggering across a whole feedback event (particles + shake + sound + haptic together) is orchestrated by an MMF_Player. | t1k-unity-rendering-vfx-graph (particles), this skill (sequencing, MMF_CinemachineImpulse screen shake, MMF_Flash) |
sfx | AudioSource.PlayOneShot / AudioMixer routing for the raw playback primitive; pool short SFX (kit budget: max 32 SFX + 2 music sources concurrent). Inside a Feel-orchestrated event, the same clip plays through MMF_Sound in the same MMF_Player. | t1k-unity-audio-core (primitive), this skill (orchestration) |
haptic | NiceVibrations 4.1.2, bundled inside Feel — see NiceVibrations Guide (references/nice-vibrations-guide.md) for degradation and the settings toggle. | this skill |
ui | uGUI (Canvas) for HUD counters, labels, and number popups — t1k-unity-ui-ugui is the UI skill documenting a DOTS→UI bridge pattern, which is the shape most feedback-driven HUD work needs. UI Toolkit is for menus/settings screens that aren’t ECS-driven. | t1k-unity-ui-ugui (HUD/DOTS bridge), t1k-unity-ui-toolkit (non-ECS screens) |
No channel above has a second, competing mechanism this kit endorses — do not introduce e.g. a raw
Handheld.Vibrate() call or a bespoke tween coroutine where a row above already names the
canonical path.
Identity
Section titled “Identity”Package: Assets/Feel/ — MMFeedbacks + MMTools + NiceVibrations 4.1.2
Version: v5.9.1 | Engine: Unity 6000.5.6f1 | Pipeline: URP only
When to Use Feel vs DOTS Lib
Section titled “When to Use Feel vs DOTS Lib”Use Feel only for presentation-layer polish — sounds, haptics, screen shake, UI toasts, particles. Never for gameplay logic.
Quick rule
Section titled “Quick rule”| Signal type | Owner |
|---|---|
| Floating damage numbers | DamageNumberSystem (DOTS lib) — NOT Feel |
| Hit flash | HitFlashTriggerSystem + HitFlashAnimateSystem — NOT Feel |
| Hit stop (slow-mo frame) | HitStopSystem + HitStopEvent — NOT Feel (TimeScale conflict) |
| Crit damage variant | DamageNumberStyleSO.crit branch — NOT Feel |
| Screen shake (trigger) | CameraTraumaAuthoring + TraumaShakeSystem — keep producer |
| Screen shake (consumer) | Feel MMF_CinemachineImpulse — replace CinemachineCameraBridge |
| Death dissolve VFX | Hybrid: DOTS triggers dissolve animation; Feel adds debris/audio/haptics |
| Loot drop toast | Feel wins: MMF_Position + MMF_CanvasGroup + MMF_Sound + MMF_NiceVibrations |
| Boss phase shake | Feel MMF_Player variant — replace BossPhaseShakeSystem consumer |
Full 9-item ChaosForge checklist: Decision Matrix (references/decision-matrix-feel-vs-dots-lib.md)
Bridge Pattern Overview
Section titled “Bridge Pattern Overview”Feel is Mono-only (main-thread, managed heap). The canonical bridge:
- DOTS
ISystem(Burst) writesDynamicBuffer<FeelEvent>on an ECS singleton entity FeelCombatBridgeMonoBehaviour polls the buffer inLateUpdate()- Bridge calls
mmf_player.PlayFeedbacks(position, intensity) - Bridge clears the buffer
NEVER call Feel from inside ISystem.OnUpdate, a Job struct, or any [BurstCompile] context. Results in UnityException: main thread only.
Full implementation: DOTS Bridge Pattern (references/dots-bridge-pattern.md)
MMF_Player Anatomy
Section titled “MMF_Player Anatomy”MMF_Player (formerly MMFeedbacks) is the runtime container. Key fields:
- Feedbacks list — ordered; each entry has
Delay,Timing,Label - Initialization Mode —
Start(default),Awake, orScript(callInitialization()manually) - Can Play While Already Playing — set per feedback; pool exhaustion risk if unchecked
- Cooldown — global re-trigger guard (seconds)
- MMChannelData — cross-component routing by channel ID
API: PlayFeedbacks(), PlayFeedbacks(Vector3 position, float intensity), StopFeedbacks(), PauseFeedbacks(), PlayFeedbacksInReverse()
Full field reference: MMF_Player Anatomy (references/mmf-player-anatomy.md)
Performance Budget (Mobile — Snapdragon 665+)
Section titled “Performance Budget (Mobile — Snapdragon 665+)”- Total Feel budget: 5–10ms/frame at 60 FPS (portrait 2160×1080)
- Concurrent event ceiling: ~50 events/frame
- NiceVibrations: 0.1ms overhead; Android vibrator is async (fire-and-forget)
- Screen shake: Cinemachine Impulse < 0.5ms; MMF_CameraShake < 0.3ms
- Particle bursts: cap at 200 particles/burst for mobile; use
ParticleSystem.Emit(n)not Play
Mobile / Platform Quirks
Section titled “Mobile / Platform Quirks”- NiceVibrations requires
Assets/Feel/NiceVibrations/Scripts/...in any assembly that calls it. iOS 6s+ and Android API 26+ only. Desktop = no-op (safe). - URP post-processing feedbacks (bloom, vignette) need
Universal RPpackage ANDPost Process LayerNOT enabled via HDRP path. See Hard rule #7 (references/hard-rules.md). - Coroutine-based feedbacks (
MMF_WaitForSeconds,MMF_Hold) ignoreTime.timeScale. UseTimescaleModes.Unscaledfor slow-mo compatibility. See Hard rule #5 (references/hard-rules.md).
Hard rules
Section titled “Hard rules”- Triggering Feel inside entity iteration → frame hitch
- Cross-thread invocation →
UnityException: main thread only - Feel refs in SubScene → broken after bake — keep in main scene
- NiceVibrations time skew — call same frame as visual
- Coroutines ignore
timeScale— useUnscaledmode in slow-mo - Pool exhaustion under high event rate — check
IsPlayingbefore re-trigger - URP/HDRP post-process parity gaps
- Prefab variant corruption after MMF_Player edit
All expanded with symptom / cause / fix: Hard rules (references/hard-rules.md)
Visual change notice
Section titled “Visual change notice”A visible change made with this skill (UI, sprites, 3D, shaders, VFX, animation, lighting, scene layout; audio excluded) follows core rule visual-change-discord-notice:
- Capture OLD before the first edit and NEW after the last (screen:
ScreenCapturein Play mode pert1k-unity-editor-cli, windowed or Xvfb only because rendering is needed; 3D, shader, VFX: same-scene frame grab; 2D asset: the file). - Return the paths and a draft Discord post to the orchestrator, which posts; the PR links the post or carries
visual-notice-waiver: <reason>. Logic only: “no visible change”. No capture: “screenshots pending:”, never a fake image.