Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UTexture2D
Description
Creates and returns a 2d texture that holds the CPU copy. This is just so that we have something to show in the editor for the cpu texture and should never be used at runtime or for game data. This function stalls while the texture is encoding due to GetPlatformData, and will return nullptr if the texture is not cpu accessible.
For game code access to the cpu copy image, use GetCPUCopy().
| Name | GetCPUCopyTexture |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Texture2D.h |
| Include Path | #include "Engine/Texture2D.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Texture2D.cpp |
UTexture2D * GetCPUCopyTexture()