t1k:unity:rendering:animation-vfx
| Field | Value |
|---|---|
| Module | rendering |
| Version | 3.1.7 |
| Effort | medium |
| Tools | — |
Keywords: animation, unity, VFX, visual effects
How to invoke
Section titled “How to invoke”/t1k:unity:rendering:animation-vfxUnity Animation & VFX
Section titled “Unity Animation & VFX”When This Skill Triggers
Section titled “When This Skill Triggers”- Setting up Animator controllers and state machines
- Creating UI animations and tween sequences
- Optimizing particle systems for mobile
- Integrating Spine or 2D skeletal animation
- VFX pooling and lifecycle management
Quick Reference
Section titled “Quick Reference”| Task | Reference |
|---|---|
| Animator, blend trees, layers, masks | Animator System |
| Tween sequences, easing, async | DOTween Patterns |
| Particle systems, mobile VFX, GPU particles | Particles & VFX |
Note: Shader Graph patterns → see
unity-shader-graphskill. Camera/post-processing → seeunity-urpskill.
Critical Rules
Section titled “Critical Rules”- LitMotion for this project — DOTS-AI uses LitMotion; DOTween patterns apply to MonoBehaviour-only projects
- Animator for skeletal — Character animation, complex state machines
- Kill tweens on destroy — Always
transform.DOKill()/ LitMotion dispose in OnDestroy - Particle budgets — Max 50 particles/system, max 5 active systems on low-end
- Pool particle systems — Never Instantiate/Destroy VFX at runtime
Key Patterns
Section titled “Key Patterns”DOTween Service (MonoBehaviour projects only)
Section titled “DOTween Service (MonoBehaviour projects only)”public sealed class TweenService{ public Sequence FadeInPanel(CanvasGroup group, float duration = 0.3f) { group.alpha = 0f; group.gameObject.SetActive(true); return DOTween.Sequence() .Append(group.DOFade(1f, duration).SetEase(Ease.OutQuad)) .Join(group.transform.DOScale(1f, duration).From(0.9f)); }}Particle Pool Pattern
Section titled “Particle Pool Pattern”public sealed class VfxPool : IDisposable{ readonly Dictionary<string, ObjectPool<ParticleSystem>> _pools = new();
public ParticleSystem Play(string vfxId, Vector3 position) { var ps = _pools[vfxId].Get(); ps.transform.position = position; ps.Play(); return ps; }}Gotchas
Section titled “Gotchas”- Animator state hash vs string:
Animator.Play("StateName")allocates; useAnimator.Play(Animator.StringToHash("StateName"))and cache the hash - Particle prewarm on mobile:
ParticleSystem.Prewarmsimulates the full system on enable — causes frame spikes on low-end devices. Disable prewarm and let particles build naturally - VFX Graph requires compute shaders: VFX Graph does not work on devices without compute shader support (older Android, WebGL). Fall back to ParticleSystem for broad compatibility
Related Skills
Section titled “Related Skills”unity-shader-graph— Shader Graph, material effects, SRP Batcherunity-vfx-graph— GPU particle VFX Graphlitmotion— LitMotion tweening (this project’s tween library)unity-mobile-ui— UI animations, transitionsunity-game-patterns— Object pooling for VFX