You’ll have to try and read the code and understand how it’s all connected, I’ll admit it’s not the best solution but it achieved the result you wanted. Optimally I’d re-do it from scratch for optimization, making use of instanced meshes.
I was however able to easily add the left and right turn, if you look in the CreateTSection function, if casting to BothCorner fails, we can assume it was either a left or right turn. So we cast to these, if the cast succeeds - use your GetAttachTransform function and set next spawn point, then run the function that creates a new straight tile at the next spawn point.