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 existingAnswerHub thread and let us know what's up.

0
Login to Vote

Backlogged
ComponentCore
Affects Versions4.9.2
CreatedOct 9, 2015
UpdatedAug 8, 2017