If a UFUNCTION takes a pointer to a component as a parameter, the project cannot be built if the component's class is marked as deprecated. The error message that is provided states that the property should be marked as deprecated as well, but adding _DEPRECATED to the end of the parameter name, or marking the UFUNCTION as deprecated does not resolve the error message.

Steps to Reproduce
  1. Create a new basic code project.
  2. Add two new code classes to the project, one Actor class (named MyActor) and one SceneComponent class (named MySceneComponent).
  3. In the Actor class, add a BlueprintCallable UFUNCTION that takes a pointer to the new SceneComponent as a parameter.
    • eg.
      UFUNCTION(BlueprintCallable, Category = TestCat)
      void Add(UMySceneComponent* Component);
  4. Build the project in Visual Studio.
  5. Add the Deprecated specifier to the SceneComponent's UCLASS macro.
  6. Update every instance of the SceneComponent's class name from UMySceneComponent to UDEPRECATED_MySceneComponent.
  7. Build the project in Visual Studio.

The build fails with the following error: LogCompile: Error: Property is using a deprecated class: /Script/TESTDeprecated2.MySceneComponent. Property should be marked deprecated as well.

The build completes successfully.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-61906 in the post.

Login to Vote

ComponentUE - Foundation - Core
Affects Versions4.
Target Fix5.0
Fix Commit17014970
CreatedJul 18, 2018
ResolvedAug 2, 2021
UpdatedDec 1, 2021
View Jira Issue