TedNindo

Alright, I am working on a game for Nintendo Switch and I am facing a problem that most likely in some ways is connected with Spine.
The problem that I am facing is that when I play for a certain period of time and die the scene gets reloaded and it can take up to 15-20 minutes to reload the game (usually it takes 4 seconds).
The levels are build up in chunks and these chunks get activated and deactivated with triggers when you enter the corresponding area.
The loading problem only occurs if you have passed a few chunks. Not if you die in the first chunk, or in the chunk you have been resurrected.
We did some tests (activating chunks and then die) to find these results. Now the interesting part is if we remove almost all Spine elements from the level (there are up to 100-200 per level / approx. 20 are active at the same time) the problem does not appear even if we activate all chunks and die.

Do you have any idea what could cause this problem?

Using spine 3.6 | Unity 2018.2
TedNindo
  • Сообщения: 32

Harald

We are sorry to hear that you are facing troubles! 15-20 minutes instead of 4 seconds sounds very strange indeed. Have you tried what happens when viewed in the Unity profiler? Perhaps memory grows over a certain ammount due to a leak, or similar (however, this still does not justify 20 minutes).

How are you loading and unloading the chunks you described above?

I know this might be hard, but could you try to strip the project down to only some problematic Spine parts and the loading logic that still shows the problem? You can send the Unity project as a zip file to contact@esotericsoftware.com.
Perhaps you could just create a simply test scene which loads and unloads the same chunk several times.

It would also be very interesting if the same setup causes the same problem with version 3.8 of Spine and the spine-unity runtime. Unfortunately this will only be feasible when the project is already condensed to a minimal scope, as above.
Аватара пользователя
Harald

Harri
  • Сообщения: 950

TedNindo

Thank you Harald. We'll continue to investigate it. Creating some test scenes with the possible problematic parts might be a good way to check on some theories. In the end, it could be something completely different. I just wanted to make sure that this is not a common problem or mistake I am making. Currently, I am not loading and unloading the chunks but just set them active or inactive. Going with a dynamic loading system might be a thing to look at. The profiler did not show any memory leakage or something very clear, but it showed that the spine elements are quite costly. The main problem with the profiler is that I have no possibility right now to use it on switch. The problem does not occur on the PC (Editor), so it is very hard to spot.
TedNindo
  • Сообщения: 32

Harald

TedNindo писал(а):Currently, I am not loading and unloading the chunks but just set them active or inactive.
Ok, I assumed you were using other means.

Are you repacking skins a lot? Or performing other means of skin, material and attachment modification frequently? There is AtlasUtilities.ClearCache(); for example which could be called after repacking skins.
Аватара пользователя
Harald

Harri
  • Сообщения: 950

TedNindo

Thank you Harald for your help.
It seems that we could solve the problem by changing the Unity Version to a more current one. So it is still very difficult to say what the problem really was but I guess it is not directly related to Spine. But I will check your suggestions since it could still help to reduce some overhead.
TedNindo
  • Сообщения: 32


Вернуться в Unity