UPROPERTY Setter metadata ignored for some types

Summary

UPROPERTY macros support Setter and Getter metadata, which are different from BlueprintSetter and BlueprintGetter.

Focusing on Setter specifically: it is meant to call a method you provide whenever the property is modified in the editor (i.e., from a details panel). The idea is that any changes to the property should go through your custom setter.

The problem: Setters work correctly for structs and container types, but do not work for pointers to objects or primitive types like float, bool, or int.

I’ve tested every combination of Edit specifiers, access specifiers, and other property metadata, but the only factor that consistently prevents the setter from being called is the variable type itself.

This happens in my custom game code aswell as in the engine itself.

Example 1: ScrollBox.h

Property: bool bAllowRightClickDragScrolling;
Setter: SetAllowRightClickDragScrolling
Issue: When modifying bAllowRightClickDragScrolling in the editor, the setter is never called. Breakpoints inside the setter are never hit.

Example 2:

Property: SkeletalMeshComponent.h
Setter: SetSkeletalMeshAsset
Issue: Even though the property uses both Setter and BlueprintSetter, changes made from the editor do not trigger the setter.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

Look for ‘Setter =’ (without ') in the engine code. You will find many examples of properties that have a Setter specifying their setter (I left two examples above that are easy to test).

Put a breakpoint in the setters.

Expected Result

The setters should be called as soon as you modify the exposed variable in any details panel, regardless of specifier access and type.

Observed Result

Only containers and struct properties seem to be using their Setter. Other types, such as bools, ints, floats or even UObject pointers will not trigger.

Awfully wrong because the engine has the Setter metadata being used for non-working types, which leads me to think this is indeed a bug and not intended.

Platform(s)

Windows

Additional Notes

This is easily one of the most helpful features I’ve ever found in the engine to impose smart and safe limits to level and game designers. Removes boiler plate code such as PreEditChange and PostEditChangeProperty and you end up with safe, nice setters that you can use normally in your code and the editor itself automatically uses.

This needs to be fixed ASAP it will improve the development experience A LOT.