Texture become empty after ReloadPackages, how to debug rendering code?

CheapMeow
Mon, 19 May 2025 02:22:40 +0000
Programming & Scripting

Problem

I use ReloadPackages to reload texture A from new pak files at runtime. UI that use texture A is refreshed perfectly, but Material B that use texture A is turning black. I use RenderDoc, and find my new texture A is not used by Material B.

Showcase

Following screen captures show one UI on the left side and one mesh on the right side.

Before ReloadPackages to reload texture A

After ReloadPackages to reload texture A

Following screen captures show renderdoc capture.

Before ReloadPackages to reload texture A

After ReloadPackages to reload texture A

Caution: Even though the texture info in bottom bar in RenderDoc is BlackAlphaOneDummy, it is an error of RenderDoc. I want to click the empty texture PS 6, and the texture info show the last clicked texture info except from PS 6. It may because PS 6 is empty, so clicking on empty doesn’t refresh texture info in bottom bar.
Does anyone have idea about how to debug?

3 posts - 1 participant