I had the same issue, and it seems generated_body will fail if it changes line where it is called (it doesn’t make any sense to me, but I’m super new to UE). I could make it work by adding the new shading model on the same line as another one (to keep the number of lines of code the same).