Including RenderCore Causes UE4 Editor Crash


Whenever I add “RenderCore” to my public dependencies in my build file and then attempt to use a UTexture2D object in my C++ code, it causes a crash in the Unreal editor. I have to delete binaries, remove that dependency from my build file and then re-open the editor and let it rebuild the files just to be able to even open my project again. Does anyone have any idea what is wrong or if there is a work around? I would really like to be able to use 2D textures in my C++ code for storing item info, but I can’t get around the crashes. If I don’t add “RenderCore” to my build file, I get a bunch of linker errors since it can’t find the dependencies. Any ideas?

Thanks in advance!

“Crash” tells nothing, you need to check the logs where there might be more info about crash, even understable by you.

Also why not just use normal UTexture?

I apologize, derp on my part. It was late and I ran out of coffee early. I will attach those logs tonight when I have access to that computer again (that’s my second job). I am trying to use it because I am supposed to be able to do so. I can use UTexture, but I am curios why this does not work. Could you attempt to duplicate it? Shouldn’t take more than a minute, just put render core in your build file, pop a UTexture2D in any class and compile.

Well UTexture are a lot easier to use (it a class of texture asset), and i think they should work without adding any combination in build script. They should work with UMG and HUD canvas (Even material work with 2nd solution)

I just check in API refrence:

And UTexture2D is part of main Engine module not RenderCore

Hmm, interesting. I was reading a post where someone had suggested to include RenderCore to use UTexture2D…too much info out there. I am still getting used to the vast resources and documentation that exists around Unreal. I appreciate you helping me out, if you post some of the info you provided above as a solution, I will accept it as the answer. From what you described, UTexture is a much better route for me and seeing the class hierarchy in the documentation at the link you provided makes me more sure this is what I want! I am relatively new to Unreal so have been struggling with the initial learning curve. I am a very experienced C++ programmer so trying to figure out all of their magic on top of how their classes and pre-processor works has been interesting for me haha. Some things are very different from what you would “expect” but for a very good reason. The stuff that this engine does is incredible. Thanks again!