From d499dba7c4bd184a3a56b017b59d9faf5230327c Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 29 Apr 2020 20:35:47 +0200 Subject: [PATCH] [unity] Unity SpriteAtlas support: Upon build to platform, the internally generated sprite atlas texture is used instead of the png file generated for the editor (to reduce additional memory usage). This completes Unity SpriteAtlas support, together with previous commit d35550d. Closes #940. --- .../Runtime/spine-unity/Asset Types/SpineSpriteAtlasAsset.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineSpriteAtlasAsset.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineSpriteAtlasAsset.cs index 71c057ff7..12b1a7005 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineSpriteAtlasAsset.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineSpriteAtlasAsset.cs @@ -190,6 +190,9 @@ namespace Spine.Unity { texture = AccessPackedTexture(sprites); Material material = materials[0]; + #if !UNITY_EDITOR + material.mainTexture = texture; + #endif Spine.AtlasPage page = new AtlasPage(); page.name = spriteAtlas.name;