v2.5.5
Changelog
- Fixed a large RAM leak when using the colour picker on clothing.
Technical detail
updateClothCustomTexture falls back to vanilla ChaControl.InitBaseCustomTextureClothes whenever ChangeCustomClothes returns false. That vanilla method overwrites ctCreateClothes / ctCreateClothesGloss with = null without calling Release() first, so every invocation orphans up to 6 CustomTextureCreate instances — each owning a full-resolution mipmapped RenderTexture and a cloned Material, plus a readable ReadPixels Texture2D for the gloss variant.
ChangeCustomClothes can keep returning false for reasons unrelated to ctCreateClothes (a missing CmpClothes component, for example), in which case the fallback re-fired on every colour-drag tick — roughly 16 times a second at the current ColorDragApplyInterval of 0.06s.
Fixed by releasing the existing custom-texture stack before re-initialising it (mirroring what vanilla ChangeClothesAsync already does), plus a per-character/per-slot guard so the fallback runs at most once per clothes change and cannot loop. The guard is cleared in updateClothTypeAsync when the slot actually changes.
Full changes: #11
Install
Drop HS2StudioCharaEditor.dll into BepInEx/plugins/.