RepoPilotOpen in app →

mob-sakai/ParticleEffectForUGUI

Render particle effect in UnityUI(uGUI). Maskable, sortable, and no extra Camera/RenderTexture/Canvas.

Mixed

Mixed signals — read the receipts

worst of 4 axes
Use as dependencyMixed

no tests detected; no CI workflows detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 7w ago
  • 6 active contributors
  • MIT licensed
Show 3 more →
  • Concentrated ownership — top contributor handles 66% of recent commits
  • No CI workflows detected
  • No test directory detected
What would change the summary?
  • Use as dependency MixedHealthy if: add a test suite

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/mob-sakai/particleeffectforugui?axis=fork)](https://repopilot.app/r/mob-sakai/particleeffectforugui)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/mob-sakai/particleeffectforugui on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: mob-sakai/ParticleEffectForUGUI

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/mob-sakai/ParticleEffectForUGUI shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Mixed signals — read the receipts

  • Last commit 7w ago
  • 6 active contributors
  • MIT licensed
  • ⚠ Concentrated ownership — top contributor handles 66% of recent commits
  • ⚠ No CI workflows detected
  • ⚠ No test directory detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live mob-sakai/ParticleEffectForUGUI repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/mob-sakai/ParticleEffectForUGUI.

What it runs against: a local clone of mob-sakai/ParticleEffectForUGUI — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in mob-sakai/ParticleEffectForUGUI | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 76 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>mob-sakai/ParticleEffectForUGUI</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of mob-sakai/ParticleEffectForUGUI. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/mob-sakai/ParticleEffectForUGUI.git
#   cd ParticleEffectForUGUI
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of mob-sakai/ParticleEffectForUGUI and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "mob-sakai/ParticleEffectForUGUI(\\.git)?\\b" \\
  && ok "origin remote is mob-sakai/ParticleEffectForUGUI" \\
  || miss "origin remote is not mob-sakai/ParticleEffectForUGUI (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "Runtime/UIParticle.cs" \\
  && ok "Runtime/UIParticle.cs" \\
  || miss "missing critical file: Runtime/UIParticle.cs"
test -f "Runtime/UIParticleRenderer.cs" \\
  && ok "Runtime/UIParticleRenderer.cs" \\
  || miss "missing critical file: Runtime/UIParticleRenderer.cs"
test -f "Runtime/UIParticleUpdater.cs" \\
  && ok "Runtime/UIParticleUpdater.cs" \\
  || miss "missing critical file: Runtime/UIParticleUpdater.cs"
test -f "Runtime/Internal/Utilities/MaterialRepository.cs" \\
  && ok "Runtime/Internal/Utilities/MaterialRepository.cs" \\
  || miss "missing critical file: Runtime/Internal/Utilities/MaterialRepository.cs"
test -f "Runtime/AnimatableProperty.cs" \\
  && ok "Runtime/AnimatableProperty.cs" \\
  || miss "missing critical file: Runtime/AnimatableProperty.cs"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 76 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~46d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/mob-sakai/ParticleEffectForUGUI"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

ParticleEffectForUGUI renders Unity particle systems directly within uGUI canvases using MeshBake and MeshTrailBake APIs (introduced in Unity 2018.2) to generate baked meshes that are fed to CanvasRenderer. The core innovation is masking and z-sorting particles natively in UI without requiring extra Camera, RenderTexture, or Canvas layers—eliminating significant rendering overhead. Standard UPM package structure: Runtime/ contains core UIParticle.cs component and extension utilities (CanvasExtensions, Vector3Extensions, Color32Extensions); Editor/ has UIParticleEditor.cs inspector and UIParticleMenu.cs context menus; Internal/ utilities and project settings; samples in Samples~/Demo for reference implementation.

👥Who it's for

Unity game developers building UIs that need visual effects (explosions, spell casts, button feedback) integrated directly into canvas hierarchies, particularly mobile and performance-sensitive projects where extra rendering passes are costly. Secondary users: asset store consumers seeking drop-in particle effects for UI prefabs.

🌱Maturity & risk

Production-ready and actively maintained. The repo shows semantic versioning (v4.12.1), GitHub CI workflows (test.yml badge), NPM distribution via OpenUPM, supports Unity 2018.2+ through modern uGUI 2.0 and HDRP/URP, and has established contribution guidelines (CONTRIBUTING.md, CODE_OF_CONDUCT.md). Latest activity visible in version history and CI automation.

Low risk: minimal dependencies (only com.unity.ugui and com.unity.modules.particlesystem), single maintainer (mob-sakai) but strong open-source track record. Main exposure: Unity version-specific APIs (MeshBake/MeshTrailBake) could break on major Unity rewrites; particle system behavior changes upstream would require adapting. No obvious stale issue backlog visible in provided data.

Active areas of work

Active maintenance with semantic versioning (current 4.12.1), CI/CD via GitHub Actions (.github/workflows/test.yml), and semantic-release automation (.releaserc.json). Code is C#-heavy (179KB) with ShaderLab shaders (3.2KB) for particle rendering. No specific breaking changes or major refactors visible in provided structure, suggesting stability focus.

🚀Get running

Clone the repo: git clone https://github.com/mob-sakai/ParticleEffectForUGUI.git. Install via OpenUPM: openupm add com.coffee.ui-particle. Or add to package.json manually: add "com.coffee.ui-particle": "4.12.1" to dependencies. No build step required—Unity handles UPM package resolution automatically.

Daily commands: No server or build required. Unity Editor handles execution: open the project in Unity 2018.2+, load Samples~/Demo scene, and press Play. The package is purely a component library—integrate by adding UIParticle component to a GameObject under a Canvas. For development, import the package into a test project, then modify Runtime/ or Editor/ files directly.

🗺️Map of the codebase

  • Runtime/UIParticle.cs — Core component that manages particle effect rendering in uGUI—entry point for all particle system integration and the primary public API.
  • Runtime/UIParticleRenderer.cs — Handles the actual rendering pipeline, mesh generation, and material application for particles within the uGUI canvas.
  • Runtime/UIParticleUpdater.cs — Manages per-frame updates of particle systems and synchronization with the UI rendering loop.
  • Runtime/Internal/Utilities/MaterialRepository.cs — Caches and manages material instances to avoid redundant material creation and memory overhead.
  • Runtime/AnimatableProperty.cs — Enables dynamic animation of particle properties through Unity's animator, a key differentiator of this package.
  • Runtime/Internal/Extensions/CanvasExtensions.cs — Provides canvas-level utilities for hierarchy traversal and sorting layer management critical to maskability.

🧩Components & responsibilities

  • UIParticle (MonoBehaviour, ParticleSystem, Serialization) — Lifecycle management (OnEnable/OnDisable), inspector properties, particle system reference binding, and public API surface
    • Failure mode: If particle system reference is lost or component is destroyed while particles are active, rendering stops but no error; silent failure
  • UIParticleUpdater (MonoBehaviour, FastAction event system) — Per-frame synchronization of all active UIParticle components with the uGUI rendering loop via LateUpdate
    • Failure mode: If updater is disabled or destroyed, particles freeze; all registered particles become invisible
  • UIParticleRenderer (Mesh, Material, GraphicRegistry) — Converts ParticleSystem state into renderable mesh, applies materials, and queues graphic for canvas rendering
    • Failure mode: Mesh generation errors (e.g., vertex count overflow) silently clamp; corrupt meshes may render as

🛠️How to make changes

Add a new animated particle property

  1. Define the property getter/setter in Runtime/AnimatableProperty.cs with appropriate clamping and type conversion (Runtime/AnimatableProperty.cs)
  2. Register the property in the animator controller Samples~/Demo/Animations/UIParticle_Demo_Animatable.controller (Samples~/Demo/Animations/UIParticle_Demo_Animatable.controller)
  3. Expose the property in the inspector editor script Runtime/UIParticle.cs or create an editor-only drawer in Editor/AnimatablePropertyEditor.cs (Editor/AnimatablePropertyEditor.cs)

Create a custom particle effect material

  1. Create a new material referencing a particle shader, stored in Samples~/Demo/Materials/ (Samples~/Demo/Materials)
  2. Assign the material to a UIParticle component via the inspector or at runtime by modifying Runtime/UIParticleRenderer.cs material binding (Runtime/UIParticleRenderer.cs)
  3. If using custom shader keywords, update material caching logic in Runtime/Internal/Utilities/MaterialRepository.cs to preserve variant selection (Runtime/Internal/Utilities/MaterialRepository.cs)

Extend particle behavior with custom attractors

  1. Create a new script inheriting from or alongside Runtime/UIParticleAttractor.cs with custom force logic (Runtime/UIParticleAttractor.cs)
  2. Register the attractor in Runtime/UIParticleUpdater.cs to apply forces during the particle update loop (Runtime/UIParticleUpdater.cs)
  3. Expose configuration in the inspector by adding serialized fields and custom editor drawers in Editor/UIParticleEditor.cs (Editor/UIParticleEditor.cs)

Optimize rendering performance for many particles

  1. Configure object pooling thresholds in Runtime/Internal/Utilities/ObjectPool.cs to reduce allocation pressure (Runtime/Internal/Utilities/ObjectPool.cs)
  2. Enable material caching in Runtime/Internal/Utilities/MaterialRepository.cs and adjust variant pooling strategy (Runtime/Internal/Utilities/MaterialRepository.cs)
  3. Review UIParticle batch settings and canvas sort order in Runtime/UIParticle.cs to minimize draw calls (Runtime/UIParticle.cs)

🔧Why these technologies

  • ParticleSystem (built-in) — Leverages Unity's optimized particle simulation engine; no custom physics needed, reduces code burden
  • uGUI (Canvas/Graphic) — Native integration with Canvas rendering pipeline enables masking and sorting without auxiliary cameras or RenderTextures
  • Animator (for AnimatableProperty) — Allows declarative, timeline-driven particle property animation without custom tween systems
  • Material/Shader caching — Minimizes per-frame allocation pressure and driver overhead; critical for performance with many particles
  • Object pooling — Avoids garbage collection stalls during particle creation/destruction cycles in dynamic scenes

⚖️Trade-offs already made

  • No separate Camera/RenderTexture for particle rendering

    • Why: Simplifies setup, reduces memory overhead, inherits canvas masking/sorting automatically
    • Consequence: Particles must be rendered as meshes within uGUI pipeline; some GPU effects (e.g., certain post-processing) unavailable
  • Material instance caching with variant pooling

    • Why: Reduces per-frame material creation overhead and GPU state changes
    • Consequence: Higher memory baseline at runtime; requires careful lifecycle management to avoid stale references
  • Update particles every frame via UIParticleUpdater

    • Why: Keeps particles synchronized with canvas rendering; simplifies timing and order-of-execution
    • Consequence: Cannot decouple particle simulation from render frame rate; no independent simulation thread
  • Animatable properties bound to Animator component

    • Why: Leverages existing Timeline/animation tools, reducing custom scripting
    • Consequence: Property changes are discrete (animator-driven) unless combined with custom OnAnimatorIK; less granular than frame-by-frame scripting

🚫Non-goals (don't propose these)

  • Real-time particle effect physics simulation beyond ParticleSystem built-ins
  • Multi-threaded or compute-shader particle simulation
  • Screen-space effects (blur, glow) on particles without separate post-processing
  • Support for 3D particle rendering in world space with uGUI
  • Serialization/deserialization of complex particle state to disk

🪤Traps & gotchas

MeshBake/MeshTrailBake APIs are Unity 2018.2+—no fallback for older versions. Particle shader compatibility depends on target graphics API (requires desktop/console shaders, mobile may need URP variants). Canvas masking behavior differs between Mask and RectMask2D (see CONTRIBUTING.md/README for workarounds). Editor/Runtime separation via asmdef means editor code doesn't ship to builds but must reference Runtime symbols correctly. ParticleSystem baking is synchronous—high particle counts can cause frame hitches (no async option).

🏗️Architecture

💡Concepts to learn

  • Mesh Baking (MeshBake/MeshTrailBake API) — UIParticle's entire rendering strategy depends on Unity's ability to snapshot particle vertex/index data into static meshes; understanding this API is essential to why this library avoids extra cameras
  • CanvasRenderer & Canvas Rendering Pipeline — UIParticle submits baked meshes to CanvasRenderer rather than direct GPU calls; requires understanding UI rendering order, batching, and masking integration
  • Stencil Buffer Masking (Mask Component) — UIParticle respects Canvas Mask stencil operations for clipping particles inside masked UI; critical for correct visual output in complex layouts
  • Assembly Definition Files (asmdef) — UIParticle uses separate asmdef for Runtime and Editor to enforce isolation and reduce build size; necessary for understanding the package structure and dependency graph
  • RenderTexture-less Rendering — The core innovation: particles render directly to canvas without intermediate RT, improving VRAM and performance; foundational concept for why this library exists
  • Z-Order Sorting & Canvas Sorting Groups — UIParticle particles respect Canvas sort order and sibling index; requires understanding depth layering in 2D UI coordinate space vs 3D space
  • Semantic Versioning & Automated Release Pipelines — Project uses .releaserc.json for automatic versioning from commits; contributors must understand semantic commit conventions (feat:, fix:, breaking:) to trigger releases correctly

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add unit tests for Runtime/Internal/Utilities core components

The Runtime/Internal/Utilities folder contains critical infrastructure (MaterialRepository.cs, ObjectPool.cs, ObjectRepository.cs, FrameCache.cs) that lacks visible test coverage. These are foundational systems that multiple components depend on. Adding unit tests would catch regressions early and make contributions safer.

  • [ ] Create Tests/Runtime/Utilities directory structure
  • [ ] Write tests for MaterialRepository.cs covering material caching and retrieval edge cases
  • [ ] Write tests for ObjectPool.cs covering object reuse, disposal, and edge cases
  • [ ] Write tests for FrameCache.cs covering cache invalidation across frames
  • [ ] Add test assembly definition file (Tests.asmdef) if not present

Add integration tests for UIParticle masking and sorting behavior

The core value proposition of this package is 'maskable, sortable' particle rendering without extra Camera/RenderTexture. There are no visible tests verifying this critical functionality works correctly across different Canvas hierarchies, mask configurations, and sort orders. This is a high-risk area for regressions.

  • [ ] Create Tests/Runtime/UIParticle directory with integration test scenes
  • [ ] Add tests verifying particles respect Canvas mask components (CanvasExtensions.cs usage)
  • [ ] Add tests verifying particle sort order is correct with sibling Canvas elements at different depths
  • [ ] Add tests verifying UIParticleAttractor.cs functionality with masked particles
  • [ ] Document test setup requirements in CONTRIBUTING.md if not present

Create GitHub Action for automated compatibility testing across Unity versions

The package supports Unity 2018.2+ but .github/workflows shows incomplete test.yml badge reference. Add a matrix-based workflow to test against multiple Unity LTS versions (2018.4, 2019.4, 2020.3, 2021.3, 2022.3) to catch version-specific issues early. This prevents user-reported compatibility bugs.

  • [ ] Create .github/workflows/unity-test-matrix.yml with multiple Unity versions using game-ci/unity-test-runner
  • [ ] Test against minimum version (2018.2) and all active LTS versions
  • [ ] Run tests for both Editor and Standalone builds if applicable
  • [ ] Add workflow status badge to README.md
  • [ ] Configure workflow to post results as PR comments for visibility

🌿Good first issues

  • Add integration tests for RectMask2D clipping edge cases (Runtime/Internal/ lacks unit test coverage for mask boundary calculations—write tests for Canvas masking correctness with rotated/scaled RectMasks)
  • Expand AnimatableProperty.cs to support custom particle system modules (currently may lack coverage for recent ParticleSystem additions like CustomData—add property accessors and test serialization)
  • Document shader compatibility matrix: create a guide listing which built-in/URP/HDRP particle shaders work with UIParticle and which require custom variants (README implies this but is incomplete)

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 92fb173 — chore(release): 4.12.1 [skip ci] (semantic-release-bot)
  • 298dc9a — fix: ignore "EditorOnly" tagged gameObjects on refresh (mob-sakai)
  • 143face — chore(release): 4.12.0 [skip ci] (semantic-release-bot)
  • 319ab5f — feat: explicit null checks (mob-sakai)
  • 04c1ca7 — chore(release): 4.11.4 [skip ci] (semantic-release-bot)
  • f2df47a — fix: avoid endless loop (mob-sakai)
  • 1dfd756 — fix: add early return for case where subEmitter module is disabled (mob-sakai)
  • c54f63c — chore(release): 4.11.3 [skip ci] (semantic-release-bot)
  • 7fb6cda — fix: fix: second and subsequent bursts not displayed when world simulation and non-looping (mob-sakai)
  • 9441f41 — fix: fix URL link in README (mob-sakai)

🔒Security observations

The ParticleEffectForUGUI codebase demonstrates good security practices overall with no critical vulnerabilities identified. The main concerns are: (1) a native DLL component without visible source verification, (2) support for outdated Unity versions that may lack security patches, and (3) potential object injection risks in the ProjectSettings deserialization mechanism. The codebase follows standard Unity package structure, uses MIT licensing transparently, and maintains clean separation of concerns. Recommended actions include updating minimum Unity version requirements, implementing DLL verification mechanisms, and adding input validation to deserialization operations.

  • Medium · Preloaded Project Settings Component — Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs. The file 'Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs' suggests automatic loading of project settings. If these settings are deserialized from untrusted sources or user input without proper validation, this could lead to object injection vulnerabilities. Fix: Ensure all deserialized settings are validated against a whitelist of allowed values. Implement strict type checking and avoid deserializing arbitrary objects from external sources.
  • Low · Outdated Unity Minimum Version — package.json - 'unity': '2018.2'. The package specifies Unity 2018.2 as the minimum version, which was released in 2018 and is no longer supported. This version may contain known security vulnerabilities in the Unity engine itself. Fix: Update the minimum Unity version requirement to a currently supported LTS version (2020 LTS or newer) to ensure users have access to security patches.
  • Low · Dependency on Native DLL Without Verification — Runtime/Coffee.UIParticle.R.dll. The package includes a native DLL 'Runtime/Coffee.UIParticle.R.dll' without visible source code or verification mechanism. Native DLLs can pose security risks if not properly signed or verified. Fix: Implement DLL signing and verification. Provide source code for the DLL or detailed documentation of its purpose. Consider publishing the DLL source to a public repository for transparency.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · mob-sakai/ParticleEffectForUGUI — RepoPilot