Trying to add a material custom output node

Hello everyone

I’m a student who is trying to use the unreal engine source code to make a custom celshading model. I’ was following the guide of 0ne3y3 (New shading models and changing the GBuffer | Community tutorial)

He uses 5.1 while I’m using the release branch version which is 5.4 I think. I recreated everything he did and was able to build the engine successfully.

Now the issue is making my custom output node. I made a new class that inherits from UMaterialExpressionCustomOutput and added the implementation to the MaterialExpressions.cpp file

After testing out the code in the material editor when I add the node the project freezes and I can’t move or even close the project without using task manager.

I need help adding this custom output node and I can’t seem to find any resources relating to my problem so as a last resort I came here.