diff --git a/Packages/UIParticle/Scripts/UIParticle.cs b/Packages/UIParticle/Scripts/UIParticle.cs index 4a66702..d04fb6c 100755 --- a/Packages/UIParticle/Scripts/UIParticle.cs +++ b/Packages/UIParticle/Scripts/UIParticle.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.Profiling; +using UnityEngine.Rendering; using UnityEngine.UI; using ShaderPropertyType = Coffee.UIExtensions.UIParticle.AnimatableProperty.ShaderPropertyType; @@ -88,7 +89,9 @@ public override Texture mainTexture var textureSheet = cachedParticleSystem.textureSheetAnimation; if (textureSheet.enabled && textureSheet.mode == ParticleSystemAnimationMode.Sprites && 0 < textureSheet.spriteCount) { - tex = textureSheet.GetSprite(0).texture; + var sprite = textureSheet.GetSprite(0); + textureSheet.uvChannelMask = (UVChannelFlags) (sprite.packed ? -1 : 0); + tex = sprite.texture; } Profiler.EndSample(); } @@ -603,4 +606,4 @@ void UpdateAnimatableMaterialProperties() } } } -} \ No newline at end of file +}