Skip to content

Instantly share code, notes, and snippets.

@Dofuru
Dofuru / UIParticleScaler.cs
Created August 13, 2020 10:16 — forked from TobiTobascoNollero/UIParticleScaler.cs
Unity - Particle Scaling for Particles inside the Unity GUI
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
/* UI Particle Scaling script by Tobi Tobasco Nollero, questions: tobias@lostmountaingames.com, http://tobiasnoller.com/
* Just drag this script on any canvas which has child particle systems underneath.
* Add your resolution change listener to scale your particles when changing resolutions.
* Prewarmed particle system emitting on begin play, will probably not be affected by the script the first time they fire.
* Feel free to use this script in any project.