Download

Override a static function

I want to change some conditions in a static function ShouldIgnoreHitResult of the PrimitiveComponent.cpp, is there a way to do that without creating a new PrimitiveComponent or writing 300 lines of code just to add another condition to the function?

No you cannot override static function. The fact that it’s static prevents it from being overriden, because polymorphism happens in dynamic context that involves searching in v-table during runtime only.

Yeah I know I can’t override them but I hoped that there some kind of go around or something because this static function doesn’t even have a declaration in the .h not really sure how did they even make it.