Correct way to do Dynamic Textures in 4.9?

I’ve been banging my head on this for quite a while now. At this point I just keep coming across the same search results trying to find a solution through google, answer hub or forums.

Are we supposed to be able to do dynamic textures with just a normal simple Unreal C++ project or does it require downloading and building the entire engine source?

Are we still supposed to use the code for UpdateTextureRegions listed at:

(if so, I can’t get it to compile in 4.9.2, see attached text file for errors. Am I missing an include perhaps?)

Or are we supposed to use this method built into UTexture2D?

(I’m guessing this method was added to UTexture2D sometime after the wiki article was written?)

Using the built in method compiles and executes without errors but something is wrong: (see image)

I’ve attached the .cpp and .h for my simple actor class. as well as screenshot of the blueprint used to apply the texture in the hopes you might catch something I’m doing wrong.

[attached compile errors.txt][1]

[attached actor.cpp][2]

[attached actor.h][3]

After some more searching I found this post: How can one compose DynamicTextures at runtime in C++? - Programming & Scripting - Unreal Engine Forums

The wiki article omits the detail that you must include the “RHI” and “Render Core” UE4 API modules in your project’s build.cs file. I added a “note” the wiki since it seemed to be a point of confusion for multiple people.

For a complete minimal working example check this forum post (but it also fails to mention the “RHI” and “Render Core” additions).

I’m still confused what the purpose of the built in method UTexture2D::UpdateTextureRegions() is.

It has the exact same signature as the function listed in the wiki article but has different behavior. I can’t seem to get it to do what it’s signature suggests it should do.

I want to load texture dynamically with mipmaps…Is there any way to do it?

me too but for some reason mip maps makes it crash (and without giving a useful error message)… so I ended up having to disable mip maps, which is bad for performance