How to create new Texture 2D asset dynamically in Blueprint function?

I have a blueprint function that is set up to be triggered from the Editor, which calls an external C++ function that gets a list of strings, which doesn’t change very often. What I’m trying to do is to loop over this list and for each one, create a texture, create an asset named based on the string (if it doesn’t already exist), and assign the texture to it. The loop iteration looks like

This works to create the texture asset with two problems:

  • If the asset already exists, it creates a new one with an increased numerical suffix.
  • I don’t see any way to assign the texture to the asset. The return value from Create New Asset is a “Control Rig Replay” object even though I’ve selected Texture Render Target 2D as the Asset Class. I have no idea what “Control Rig Replay” is but it doesn’t seem to have any methods for assigning a texture.

My questions are this

  1. How do I check if an asset exists and retrieve it? The “Get Asset” function has an “In Asset Data” input but I don’t see how I fill that with the path specified to create?
  2. How do I assign the texture I create to that asset?