diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf15a1..d40e720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [3.0.0-preview.10](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.9...v3.0.0-preview.10) (2020-04-30) + + +### Features + +* add support for SpriteAtlas ([b31e325](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b31e325bb1ef0856cb1ac4c4b0c4da0f1578b8ba)) + # [3.0.0-preview.9](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.8...v3.0.0-preview.9) (2020-03-04) diff --git a/Scripts/UIParticle.cs b/Scripts/UIParticle.cs index 4a66702..d04fb6c 100755 --- a/Scripts/UIParticle.cs +++ b/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 @@ namespace Coffee.UIExtensions 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 @@ namespace Coffee.UIExtensions } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 9492cc6..0793c78 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.ui-particle", "displayName": "UI Particle", "description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.", - "version": "3.0.0-preview.9", + "version": "3.0.0-preview.10", "unity": "2018.2", "license": "MIT", "repository": {