Textures for Achievements, or Level Icon textures don’t load properly when the game is packaged for Windows but do work when testing with PIE. These textures are “dynamically” loaded using the following code:
These textures are not a power of two as they are UI textures. Do they need to be converted to ^2? Anything else I can do to get the textures to load properly?
Thank you.
EDIT [2015.10.15.12:12:00]
I now know it has nothing to do with power of 2 textures. It may be more to do with the garbage collector more than anything else. I managed to get the textures loaded, and visible in the UI. However, after coming back from gameplay the textures are white again.
It appears to be with TAssetPtr usage. Possibly I’m not using it correctly. Two major changes that I made were to switch from initialing loading the textures to loading them on each call. That is, when a specific texture is requested to call my LoadTexture function:
Upon initial startup this works fine. However, stating the game and returning back to the menu causes the game to crash. Should the code be reworked to: