Description

Attempting to pass an array of interfaces into a UFUNCTION will fail at compile stating "cannot convert argument 1 from 'TArray<ElementType,FDefaultAllocator>' to 'const TArray<TScriptInterface<IInterface>,FDefaultAllocator> &'"

Steps to Reproduce
  1. Open UE4Editor (any project)
  2. Add class based on actor (MyActor)
  3. In MyActor.h add the following:
    UFUNCTION(BlueprintCallable, Category = Debug)
    	void MyFunction(const TArray<TScriptInterface<IInterface>>& ArrayFunc);
    
  4. In MyActor.cpp add the following:
    void MyActor::MyFunction(const TArray<TScriptInterface<IInterface>>& ArrayFunc)
    {
    
    }
    
  5. Compile

Have Comments or More Details?

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

0
Login to Vote

Cannot Reproduce
ComponentUE - Foundation - Core
Affects Versions4.9.2
Target Fix5.0
CreatedOct 9, 2015
ResolvedJul 26, 2021
UpdatedJul 27, 2021
View Jira Issue