Description

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.

RESULT:
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.

EXPECTED:
The build completes successfully.

Have Comments or More Details?

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

2
Login to Vote

Unresolved
ComponentCore
Affects Versions4.18.34.19.24.21
CreatedJul 18, 2018
UpdatedJul 20, 2018