diff --git a/Source/Blu/Private/BluBluprintFunctionLibrary.cpp b/Source/Blu/Private/BluBluprintFunctionLibrary.cpp index b19c682..a358af0 100644 --- a/Source/Blu/Private/BluBluprintFunctionLibrary.cpp +++ b/Source/Blu/Private/BluBluprintFunctionLibrary.cpp @@ -12,8 +12,7 @@ UBluEye* UBluBlueprintFunctionLibrary::NewBluEye(UObject* WorldContextObject) { UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull); - FStaticConstructObjectParameters Params(UBluEye::StaticClass()); - UBluEye* Eye = Cast(StaticConstructObject_Internal(Params)); + UBluEye* Eye = NewObject(WorldContextObject); return Eye; diff --git a/Source/Blu/Private/BluEye.cpp b/Source/Blu/Private/BluEye.cpp index 081fb5c..2adcd0f 100644 --- a/Source/Blu/Private/BluEye.cpp +++ b/Source/Blu/Private/BluEye.cpp @@ -175,7 +175,7 @@ void UBluEye::TextureUpdate(const void *buffer, FUpdateTextureRegion2D *updateRe { for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++) { - (RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData() + RHIUpdateTexture2D(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData() + RegionData->Regions[RegionIndex].SrcY * RegionData->SrcPitch + RegionData->Regions[RegionIndex].SrcX * RegionData->SrcBpp); }