I had the idea to give my main character some other costumes. The current version (working) has no skin at all just uses the default settings. So I created two new skins and added the current version of the art to skin one the new art pack to skin two. Everything worked fine in the Spine Editor. But as I exported it to Unity I ran into some problems.
The SkeletonData shows that the Atlas can't be found. I get a long list of missing regions.
And I get some error messages too:
Error reading atlas file for atlas asset: hero_Atlas
Object reference not set to an instance of an object
at Spine.Atlas.ReadTuple (System.IO.TextReader reader, System.String[] tuple) [0x0000b] in C:\forgeAHero_repo\repo_bitbucket\ForgeAHero_current\Assets\spine-csharp\Atlas.cs:216
at Spine.Atlas.Load (System.IO.TextReader reader, System.String imagesDir, TextureLoader textureLoader) [0x00068] in C:\forgeAHero_repo\repo_bitbucket\ForgeAHero_current\Assets\spine-csharp\Atlas.cs:126
at Spine.Atlas..ctor (System.IO.TextReader reader, System.String dir, TextureLoader textureLoader) [0x00021] in C:\forgeAHero_repo\repo_bitbucket\ForgeAHero_current\Assets\spine-csharp\Atlas.cs:102
at Spine.Unity.AtlasAsset.GetAtlas () [0x000a6] in C:\forgeAHero_repo\repo_bitbucket\ForgeAHero_current\Assets\spine-unity\Asset Types\AtlasAsset.cs:138
UnityEngine.Debug:LogError(Object, Object)
Spine.Unity.AtlasAsset:GetAtlas() (at Assets/spine-unity/Asset Types/AtlasAsset.cs:142)
Spine.Unity.SkeletonDataAsset:GetAtlasArray() (at Assets/spine-unity/Asset Types/SkeletonDataAsset.cs:178)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/spine-unity/Asset Types/SkeletonDataAsset.cs:126)
Spine.Unity.SkeletonRenderer:Initialize(Boolean) (at Assets/spine-unity/SkeletonRenderer.cs:201)
Spine.Unity.SkeletonAnimator:Initialize(Boolean) (at Assets/spine-unity/SkeletonAnimator.cs:66)
Spine.Unity.SkeletonRenderer:Awake() (at Assets/spine-unity/SkeletonRenderer.cs:153)
NullReferenceException: Object reference not set to an instance of an object
Spine.Unity.Editor.SkeletonDataAssetInspector.PopulateWarnings () (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:567)
Spine.Unity.Editor.SkeletonDataAssetInspector.InitializeEditor () (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:115)
Spine.Unity.Editor.SkeletonDataAssetInspector.OnEnable () (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:78)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
So I am not sure what is going on with the texture atlas. I did not change anything in my workflow while exporting, so this is a riddle to me how the skins affect this.

Using: 3.6.53 Pro and 3.6.xx runtimes

Any help is appreciated!
Posts: 25


This is a very unusual-looking error. Not sure yet if this is particularly a Unity thing but you don't need to post anywhere else. We may need a copy of atlas export though (.png and .atlas.txt file), and a screenshot of your Texture Packer settings.

You can send it to contact@esotericsoftware.com
Please include a link to this forum topic.

Did you also check if your .atlas.txt file is empty or anything similarly strange?


We've received your email.
I checked the asset you sent labeled "error". I don't seem to be getting the same error as you posted above.

But I notice your skeleton is looking for images that your atlas does not contain. A lot of the image paths contain "Adventurer/something" or "Standard/something" which the altas has flattened to remove. I think you want "Unteverzeichnisse kombinieren" and not "Pfade ablachen" to solve that problem.
Your "working" json does not contain image folder paths so that's probably why it works fine.
This seems to be an entirely different problem from what you initially posted.
User avatar

Posts: 5173


thank you for your help. I am a bit confused why these are two different errors. But unfortunately I can't double check it right now. I'll be Out of Office for a while (TGS) but I'll get back at it as soon as Im back.
Posts: 25

Return to Unity