Making incomplete type complete

Hi! I am trying to write a system, which will automatically populate terrain landscape splines for me.

So, I’ve managed to reference FLandscapeToolSplines tool like this:

LandscapeEdMode->SetCurrentToolMode("ToolMode_Manage", false);
FLandscapeToolSplines* landscapeSplinesTool = (FLandscapeToolSplines*)LandscapeEdMode->CurrentTool;

This compiles fine.

But now, the moment I try to use the pointer like landscapeSplinesTool->… unreal complains about incomplete type. I just can’t fix this for many hours now. The actual FLandscapeToolSplines class has no header and seems to be forward-referenced. I am still quite noob with C++ and do not know, what do to in this case. Any help is appreciated.

If the class is declared in a cpp file, I don’t think there is any way to use it outside of it. You’d have to modify the engine and move it to a header.

Got it, thank you. I’ll just copy/past all needed functions into my own class then.