i find some information about dynamic load texture. but now i want to dynamic unload the texture to save memory.
load texture
UTexture2D* ATopSpinGameMode::TLoadTextureFromPath(const FString& Path)
{
if (Path.IsEmpty())
return NULL;
return Cast(StaticLoadObject(UTexture2D::StaticClass(), NULL, *(Path)));
}
if you simply remove any pointer to it, it should be removed automatically
thank you~~