I’ve just begun getting into learning the Engine’s API and am quite rusty when it comes to C++.
In a test that I was doing, I was trying to compare values and coming from Blueprints, I wanted to call upon the Nearly Equal Function. I googled it up and it was this:
However, I’m not entirely sure of how to call it since I know that putting it into a Cpp file within a function as it’s shown will result in a block-illegal calling action.
An example of how I was looking to use it with code that already works:
How could I insert IsNearlyEqual(HorizontalDistance, IsCloserThanDistance, CloseDistanceBuffer) in a proper way so that it successfully returns the boolean value without an illegal action result at compile time?
You should not include header file in absolute path, UE tools don’t expect you to do so there might lead to potential unexpected breaks in future. You would also not pass plugin validation test for marketplace with that.
UBT automatically add include paths to the Public folder of each module so cut the path to the Public, so it should look like this: