Description

Trying to pass a TAssetPtr to a BlueprintImplementableEvent function will result in a build failure. It appears that the TAssetPtr should be passed as a const reference, but this results in an error in the generated code.

Steps to Reproduce
  1. Download the attached zipped project file.
  2. Associate the project with your Stream.
  3. Build the project in Visual Studio.
  4. Open the MyActor.h file.
  5. Uncomment the two commented lines declaring the OnMyEvent UFUNCTION.
  6. Build the project in Visual Studio.

RESULT:
The build fails with the following message: D:\Unreal Projects\TestTAssetPtr 4.11\Intermediate\Build\Win64\UE4Editor\Inc\TestTAssetPtr\TestTAssetPtr.generated.cpp(17): error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const TAssetPtr<UTexture2D>' (or there is no acceptable conversion)

The error indicates that the problem is in the generated code, and points to the following line: TextureAssetID=Parms.TextureAssetID;

EXPECTED:
The build completes successfully.

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.104.11
Target Fix4.18
Fix Commit3520079
Main Commit3548391
Release Commit3643070
CreatedDec 2, 2015
ResolvedJul 13, 2017
UpdatedSep 26, 2017
View Jira Issue