I am trying to set up actor teams for use with the AI Perception system, where a base class derived from ACharacter exposes the team as an FName and uses a setter SetTeamName to turn that into an FGenericTeamId. I declare the setter function and variables in my header as:
While the GetOptions works fine, properly displays my set of viable team FNames and appears to set TeamName, it does so directly and does not go through SetTeamName. I have verified this by running the game in debug through Visual Studio and setting a breakpoint in the setter, which never hits.
I’ve tried this with the UFUNCTION macro, without it, with explicitly setting the Setter method, with and without a Getter, and changing the method signature to use an FName directly instead of a const reference. Any help would be appreciated!
Edit:
To be more specific, I want the setter to be called when setting the value in the Details pane:
@3dRaven thank you for replying, I should have been more specific. I want the Setter to be called when I set the value through the Details pane specifically, not through a Blueprint. For example:
I guess I was under the impression that Setter was different from BlueprintSetter, as the latter seems more explicit to blueprints. I had completely forgotten about PostEditChangeProperty, that probably is the only way to do what I want. Thanks!