How to know if a UBlueprint has a construction script ?

Hi

I retrieve the UBluePrint from my actor like that :



UClass* Class = Actor->GetClass();
UBlueprint* Blueprint = Cast<UBlueprint>(Class->ClassGeneratedBy);


Now I need to know if the Blueprint has a construction script (I mean used or not)
does I need to explore Blueprint->SimpleConstructionScript ?

Nic

I don’t think you can really check that to be honest. OnConstruction() is the C++ equivalent of the Blueprint Construction Script. Any solution that checks for ‘nodes’ in the Construction Graph wouldn’t work outside of editor anyway.

The only way I think you could do this would be to create some kind of interface, make sure every blueprint that will ever run through this function implements that interface, and ask it to return a bool of some kind, that you set in Blueprint. Hardly a good solution though, and not fool-proof.