diff --git a/SocketIOClient.uplugin b/SocketIOClient.uplugin index 467a89e9..cc97dd1e 100644 --- a/SocketIOClient.uplugin +++ b/SocketIOClient.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "2.0.0", + "VersionName": "2.0.1", "EngineVersion" : "5.0.0", "FriendlyName": "Socket.IO Client", "Description": "Real-time networking library Socket.IO Client usable from blueprints and c++.", diff --git a/Source/CoreUtility/Private/CUBlueprintLibrary.cpp b/Source/CoreUtility/Private/CUBlueprintLibrary.cpp index c355592c..87fea6eb 100644 --- a/Source/CoreUtility/Private/CUBlueprintLibrary.cpp +++ b/Source/CoreUtility/Private/CUBlueprintLibrary.cpp @@ -82,7 +82,7 @@ UTexture2D* UCUBlueprintLibrary::Conv_BytesToTexture(const TArray& InByte [UpdateData](FRHICommandList& CommandList) { RHIUpdateTexture2D( - ((FTextureResource*)UpdateData->Texture2D->Resource)->TextureRHI->GetTexture2D(), + ((FTextureResource*)UpdateData->Texture2D->GetResource())->TextureRHI->GetTexture2D(), 0, UpdateData->Region, UpdateData->Pitch, @@ -366,7 +366,7 @@ TFuture UCUBlueprintLibrary::Conv_BytesToTexture_Async(const TArray [UpdateData](FRHICommandList& CommandList) { RHIUpdateTexture2D( - ((FTextureResource*)UpdateData->Texture2D->Resource)->TextureRHI->GetTexture2D(), + ((FTextureResource*)UpdateData->Texture2D->GetResource())->TextureRHI->GetTexture2D(), 0, UpdateData->Region, UpdateData->Pitch, @@ -390,18 +390,18 @@ bool UCUBlueprintLibrary::Conv_TextureToBytes(UTexture2D* Texture, TArray IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked(FName("ImageWrapper")); TSharedPtr ImageWrapper = ImageWrapperModule.CreateImageWrapper((EImageFormat)Format); - int32 Width = Texture->PlatformData->Mips[0].SizeX; - int32 Height = Texture->PlatformData->Mips[0].SizeY; + int32 Width = Texture->GetPlatformData()->Mips[0].SizeX; + int32 Height = Texture->GetPlatformData()->Mips[0].SizeY; int32 DataLength = Width * Height * 4; - void* TextureDataPointer = Texture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_ONLY); + void* TextureDataPointer = Texture->GetPlatformData()->Mips[0].BulkData.Lock(LOCK_READ_ONLY); ImageWrapper->SetRaw(TextureDataPointer, DataLength, Width, Height, ERGBFormat::BGRA, 8); //This part can take a while, has performance implications OutBuffer = ImageWrapper->GetCompressed(); - Texture->PlatformData->Mips[0].BulkData.Unlock(); + Texture->GetPlatformData()->Mips[0].BulkData.Unlock(); return true; }