Hi,
which is the best way to load an image to a UImage widget starting from a path of a jpg file?
I’ll try this code, but it work only if the path is of a texture element (ex: “/Game/Texture/mytexture”)
UImage *image = NewObject<UImage>(UImage::StaticClass());
FString ImagePath = FPaths::GameContentDir() + "Images/image.jpg";
UTexture2D* Texture = Cast<UTexture2D>(StaticLoadObject(UTexture2D::StaticClass(), NULL, *(ImagePath)));
image->SetBrushFromTexture(Texture);
Thanks