• RuntimesUnity
  • In spine3.8 version, a white square bug appears

When some Spine animations as UI are executed for the first time, a flashing white square will always appear.

Here is the video, I would like to know how to solve this annoying problem, thank you!

Related Discussions
...

Nate
This animation is a sequence diagram. It is closed by default. The first picture will not be opened until you enter the first frame of the animation.

I still think there is no enough information to figure it out. Maybe see if you can get your app to show the white box and then debug is to see what it is. It could be something like you set an animation but don't update the world transform, so the first frame is undefined, from the setup pose, or from the last pose the skeleton had.

    I asked 2 questions in post #2. For us to be able to help, you need to show how this occurs without requiring us to debug your application code. You can create a reproduction example that contains nothing except your skeleton showing the problem. However, we no longer develop fixes in 3.8, which is very, very old. Your best bet is likely to upgrade to the latest stable version, currently 4.1. You will need to re-export your skeletons with 4.1 and update your runtime to 4.1 to match.

    @z9yu2sc571 This white rectangle likely appears due to the issue of the forum posting you shared above. Which exact version of the spine-unity runtime (name of the unitypackage, also listed in Assets/Spine/version.txt) are you using? Note that the fix has also been back-ported to spine-unity 3.8.

      Harald
      spine version
      Package version: spine-unity-3.8-2021-11-10.unitypackage

      unity version
      2020.3.19f1
      This is some content of our project. I don’t know if this will help to understand the situation.
      Link

      @z9yu2sc571 Sorry, I just discovered that the respective commit was only parttially back ported to 3.8 (via this commit). Only the non-risky parts have been backported, but the required RawImage vs. SkeletonSubmeshGraphic changes have not.

      You would need to manually integrate the following commit to your 3.8 runtime installation:
      EsotericSoftware/spine-runtimes214c778

      일 년 후

      I have tried to backport this bugfix,as it only appears in UI, but got this instead:

      So graphics is no longer shown at all, and white rectangle is displayed forever. Opposite of desired. Well, i think now I undestand what means "non-risky" parts. Or did I something wrong? I have literally updted to spine-unity-3.8-2021-11-10 and manually applied this 2-files commit.

      Is any other option to get rid of this annoying bug. It only happens in my 4-chars rpg if I quickly switch active character and puppet is adjusted to fit current character. Maybe I can somehow prevent first frames to be drawn or like that?

      upd:

      Can't add 'SkeletonSubmeshGraphic' to Renderer0 because a 'RawImage' is already added to the game object!
      A GameObject can only contain one 'Graphic' component.
      UnityEngine.GameObject:AddComponent()

      Oh, should I also reemove RawImages everywhere to make it work?

      UPD2: oh now, I just restarted game 2 times and suddenly it seems to work and bug is gone. I do not need to update any RawImages in Inspector.

      It looks like I need to re-save all scenes where such UI-skeltons used, and activate such skeleons shortly, if disabled in scene for save. Then seems to work, but I somehow strange I need to on/off such SkeleonGraphics to make this backport work.

      @Maltakreuz Sorry to hear you were having troubles, glad to hear you've figured it out. Normally the upgrade from RawImage to SkeletonSubmeshGraphic happens automatically, perhaps something went wrong due to separately applying the first commit and then the second commit.

      After the GameObjects are updated, the prefab or scene needs to be saved, yes. IIRC the automatic update will be performed by editor scripting, so it likely won't be performed at runtime if you don't save it and build and run the game.