Summary
When using UFUNCTION(CallInEditor)
on a function inside a class derived from UDeveloperSettings
, the corresponding button appears in the Project Settings UI. However, clicking the button does not actually call the function — no log output, no breakpoint hit, and no runtime behavior occurs.
Reproduction Steps
- Create a class derived from
UDeveloperSettings
. - Add a function marked with
UFUNCTION(CallInEditor)
. - Open the Project Settings and locate the button corresponding to that function.
- Click the button.
Expected Result
The function should be executed when the button is clicked, as it works with AActor
and UActorComponent
classes.
Actual Result
Nothing happens. The function is never triggered.
Notes
- The button is rendered correctly in the Project Settings panel.
- No log or trace of the function execution is observed.
- This might be due to
UDeveloperSettings
not being instantiated in a way that supportsCallInEditor
.
Request
If this is not a bug but an intentional limitation, please clarify in the documentation. Otherwise, it would be helpful to support CallInEditor
inside UDeveloperSettings
, as it allows for more convenient editor tooling.
Example Code
UCLASS(config=Game, defaultconfig)
class UMyProjectSettings : public UDeveloperSettings
{
GENERATED_BODY()
public:
UFUNCTION(CallInEditor, Category="Test")
void DoSomething();
};
void UMyProjectSettings::DoSomething()
{
UE_LOG(LogTemp, Warning, TEXT("DoSomething() was called."));
}