I need to load texture and read color. TSoftObjectPtr<UTexture2D> SectionBack = TSoftObjectPtr<UTexture2D>(FSoftObjectPath("/Game/Generators/Worlds/Worlds/Model/Textures/BackSegmentSurface_ncl1_1.BackSegmentSurface_ncl1_1"));
load it with UTexture2D* sectionBack = sectionBackPointer.LoadSynchronous();
use pointer to access const FColor* BackImageData = static_cast<const FColor*>(sectionBack->PlatformData->Mips[0].BulkData.LockReadOnly());
Next read it to array
FColor SectionBack[4096 * 4096];
SectionBack[y * sectionBack->GetSizeX() + x] = BackImageData[y * sectionBack->GetSizeX() + x];
and unlock bulk data
sectionBack->PlatformData->Mips[0].BulkData.Unlock();
everything compiled, but sectionBack->GetSizeX()
returns 0
and color data is 0
How to make it read color from texture?