Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace depricated variable with new accessor. #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/RuntimeMeshLoader/Private/MeshLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ UTexture2D* UMeshLoader::LoadTexture2DFromFile(const FString& FullFilePath, bool
Height = ImageWrapper->GetHeight();

//Copy!
void* TextureData = LoadedT2D->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
void* TextureData = LoadedT2D->GetPlatformData()->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
FMemory::Memcpy(TextureData, UncompressedBGRA.GetData(), UncompressedBGRA.Num());
/*if you use the code"const TArray<uint8>* UncompressedBGRA = NULL;",Accordingly, since UncompressedBGRA becomes a pointer, you need to use a pointer reference method, like this
FMemory::Memcpy(TextureData, UncompressedBGRA->GetData(), UncompressedBGRA->Num());*/
LoadedT2D->PlatformData->Mips[0].BulkData.Unlock();
LoadedT2D->GetPlatformData()->Mips[0].BulkData.Unlock();

//Update!
LoadedT2D->UpdateResource();
Expand Down