How can I cleanly unload Spine caches during Unity runtime? After unloading, I noticed using the Memory Profiler that many Spine-related data are still in memory.
The code I'm using is:
void UnloadSkeleton () {
Resources.UnloadAsset(skeletonDataAsset);
skeletonDataAsset = null;
Destroy(createdSkeletonObject);
Resources.UnloadUnusedAssets();
}
I used the Memory Profiler to capture two frames, one before and one after unloading, and noticed that there are still Spine data present in the resources common to both frames. How can I completely and cleanly unload these?
As seen in the image below