VFX Manager
I designed and implemented a centralized VFX Manager system responsible for spawning and managing all visual effects triggered by combat, abilities, and in-world interactions. Instead of gameplay systems instantiating effects directly, all VFX requests are routed through this manager, ensuring consistency, maintainability, and scalability as the project grows.
The manager uses a Singleton pattern, allowing it to be accessed globally from any gameplay system while guaranteeing that only a single instance exists at runtime. This avoids duplicate spawns, conflicting logic, and fragmented VFX handling across the codebase.
VFX Prefab Management
To decouple gameplay logic from visual assets, I implemented a dictionary-based lookup system that maps string identifiers to their corresponding VFX prefabs. Gameplay systems can request visual effects by name, without holding direct references to prefab assets.
This design keeps gameplay code clean and modular, simplifies iteration on visual assets, and reduces technical debt by centralizing VFX ownership within a single system.
VFX Spawning, Scale & Lifetime Handling
When a visual effect is requested, the VFX Manager spawns the appropriate prefab at the provided position and rotation, and optionally applies a custom scale parameter passed in by the caller. This allows the same effect asset to be reused across different abilities, characters, or impact strengths without duplicating prefabs.
Each VFX is primarily responsible for managing its own lifetime, such as destroying itself once a particle system has finished playing. As a safety measure, the manager also enforces a fallback cleanup mechanism that automatically destroys any effect that exceeds a maximum lifespan, preventing unintended resource leaks.
Designer Tools
To support rapid iteration and empower non-programmers, I exposed editable offset values for individual VFX assets that designers can adjust directly in the editor. This enables precise placement of visual effects relative to characters, weapons, or environmental interactions without requiring code changes.
Combined with runtime scale control, these tools give designers flexible control over the appearance and feel of effects while maintaining a clean and reusable asset pipeline.
Why This System Matters
This VFX Manager provides a robust and extensible foundation for the game’s visual effects pipeline. By centralizing effect spawning, supporting scalable reuse through parameterization, and incorporating safety-focused lifetime management, the system improves reliability, maintainability, and cross-disciplinary collaboration.