[Notice of Holidays]
Please note that our staff will not be available from 2024/Dec/28 - 2025/Jan/5 JST.
The Live2D Creators Forum will remain open during the holidays.
Submissions that require a response will be answered after we reopen for business.
Please note that it will take longer than usual to respond to your request.
Hello!
Is it possible to unload model assets after destroying gameobject with LAppModelProxy attached?
I working on visual novel game with multiple characters and really want to control used memory to keep system requirements as low as possible. I noticed that model meshes remains and memory after destroying live2d model gameobject. Resources.UnloadUnusedAssets() do the job but causes lag spike in profiler so I am trying to figure out more effective way to unload unused live2d meshes.
0 ·
Comments
Added this code to LAppModel.cs
public void OnDestroy() { GetLive2DModelUnity().releaseModel(); }
and this code to LAppModelProxy.cs
void OnDestroy() { model.OnDestroy(); }
Now all live2d meshes unloads form memory after destroying GameObject with LAppModelProxe.cs attached.