Fail to pass TArray from C++ to Blueprint

I had a similar problem, I solved it by having the function signature as follows

MyFunction(const TArray<AActor*>& VarName)