I want to copy source texture from sprite and use for this DuplicateObject function, but engine crash and point me line with it.
UTexture2D* GetTextureFromIconSprite()
{
//Problem: Cant Destroy Sprite because Texture has pointer on source texture from it
UPaperSprite* Sprite = Icon.LoadSynchronous(); //Icon is TAssetPtr<UPaperSprite>
UTexture2D* Texture = DuplicateObject(Sprite->GetSourceTexture(), NULL, NAME_None);
UOTPFunctions::DestroyUObject(Sprite);
return Texture;
}