azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 58 forks source link

How do I unload spine objects? #44

Closed shibekin69 closed 7 years ago

shibekin69 commented 7 years ago

How do I go about unloading spine objects from the stage without removing the cached textures?

AleBles commented 7 years ago

If you mean removing the spine object itself, with all spine references except textures than there is no nice destroy method yet that can do this

If you only want the object removed from the visible stage you could do: spine.parent.removeChild(spine);

shibekin69 commented 7 years ago

Hmm.. Just as I thought.

Related to that odd loading bug I encountered, here's the weird thing about it - first boot, first load up, even with the speeded up loading of the scene, there's no chance that I'll encounter that bug. It really only appears on the 2nd and succeeding loading of save games. And here I assumed that since all the spine textures have been loaded, there shouldn't be problems anymore.