Procedural Texture Generation 4.27

I’ve tried the steps and code provided in Procedural Texture Generation and How to use ENQUEUE RENDER COMMAND, and I’m running into the issue that RegionData->Texture2DResource->GetTexture2DRHI() is returning nullptr. Does anyone know what needs to be changed to make it work in 4.27, or if there is some other way to dynamically change a texture?

nevermind; apparently the UTexture2D::UpdateTextureRegions() works, which raises the question why it isn’t used in the tutorial.
Strangely, the documentation on the function mentions bFreeData, but the function doesn’t actually have that parameter; the DataCleanupFunc parameter conversely isn’t mentioned in the docs.