You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
feat: adaptive scaling for UI
Changing the canvas size does not affect the effect size or position. This feature provides a constant-looking output and makes it easier to adjust effects. BREAKING CHANGE: If you update to v4, you may be required to adjust your UIParticle.scale.
This commit is contained in:
@@ -212,6 +212,10 @@ namespace Coffee.UIExtensions
|
||||
public void UpdateRenderers()
|
||||
{
|
||||
var newScale = Vector3.one;
|
||||
//if (uiScaling)
|
||||
{
|
||||
newScale = transform.parent.lossyScale.Inverse();
|
||||
}
|
||||
if (transform.localScale != newScale)
|
||||
{
|
||||
transform.localScale = newScale;
|
||||
|
||||
Reference in New Issue
Block a user