How to tell if a function is called by a constructor?

Ok, you were totally right!

I found a more clear example in the SceneComponent.cpp file

FUObjectThreadContext& ThreadContext = FUObjectThreadContext::Get();
if (ThreadContext.IsInConstructor > 0)
{...}
else
{...}

This is going to be handy!

1 Like