Description

If ConstructorHelpers::FObjectFinder is used with UPaperFlipbook as its class specifier, compiling the code fails with the following error:

Error C2664 'void ConstructorHelpers::ValidateObject(UObject *,const FString &,const TCHAR *)': cannot convert argument 1 from 'UPaperFlipbook *' to 'UObject *'

Regression?: Yes
This did not occur in 4.14.3-3249277+++UE4+Release-4.14
This does occur in 4.15.0-3299760+++UE4+Release-4.15

Steps to Reproduce
  1. Create a project based off the 2D Side Scroller template called MyProject
  2. In MyProjectCharacter.cpp, add the following line of code at line#16
     static ConstructorHelpers::FObjectFinder<UPaperFlipbook> IdleAnimationObj(TEXT("/Game/2dSideScroller/Sprites/IdleAnimation.IdleAnimation")); 
  3. Compile the project
    Result: The compile fails on ValidateObject, mentioning that UPaperFlipbook* cannot be converted to UObject*
    Expected: The compile succeeds

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

1
Login to Vote

Non-Issue
ComponentUE - Foundation - Core
Affects Versions4.154.16
CreatedFeb 21, 2017
ResolvedFeb 21, 2017
UpdatedJul 14, 2021
View Jira Issue