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?
Not sure why this method was marked as static. I would say 300 lines of code it is.
Really thinking just to edit the source because the 300 lines of code in c++ is a pain in the as* is a compliment.
There no point of doing so as it is redundant, override is only useful when you got a object of different type then variable type from where you make call. With static function you need to point to class namespace and this is how you point to specific version of function. let say you got AMyClass based from ABaseClass with static function “Function”:
AMyClass::Function();
ABaseClass::Function();
This will call 2 different functions in there respective classes. If you declare function with same name without virtual it is being so called hidden and if you have variable of specific type that function will be used from that type, same goes with static you just point to