DTDT

I am using Spine Runtimes for 4.0

When I run the program from the editor, spine objects work as expected, a simple animation on loop. However in the build, every Spine Object is invisible, not visible, nothing visually is shown.

I don't have any errors or anything. I am trying to find some answers but I have yet to find anyone that has this issue that didn't resolve it without something that appeared to be human error, such as switching the game object to editor only in tags or something with the competition of layers/hierarchy.

I created the initial object by dragging the spine data object into the scene and clicking on the spine animation object and then I prefab it and store that in a scriptable object that holds all the data of a particular character/creature I store the entire GameObject rather than any spine related class. Maybe that is the issue? It seemed like that was the recommended way to handle Spine Objects as the docs specifically state that instantiating them from their base parts from the runtime api is not recommended.

I just followed their own documentation and the "Getting Started" area in particular.

With how big Unity I know there are a lot of gaps in my knowledge so if anyone has ever run into something like this and figured it out I would love to hear from you.

One of the current things I am looking into is if it has anything to do with using Universal Render Pipeline (URP) as opposed to the old render pipeline. I've seen people run into issue with compatibility/breaking particularly on materials/shaders on the switch.

So I don't think it's the sorting issue. The spine objects in question are on a layer that has a greater hierarchy than the default layer which is what the background is on.

The only sprite in the scene is the background which is default layer, sorting order 0.

The spine objects are on battle character layer, sorting order 0 and in different places on the screen.

I have the sort order set to Y so if they were on competing the sort layer and order, the top spine object would be behind and the one on the bottom would still be visible and in front of the background. I can confirm this behavior as it works in the rest of the game.

Thanks in advance

RunInBuild.jpg
RunInEditor.jpg
You do not have the required permissions to view the files attached to this post.
DTDT
  • Posts: 1

Harald

Sorry to hear you're having troubles. Did you test whether your SkeletonAnimation GameObject is visible when disabling all your background Sprites (to make sure it's not an ordering issue)? Are you using any delayed-loading mechanisms such as asset bundles, and the like?
User avatar
Harald

Harri
  • Posts: 4164


Return to Unity