I create a Stucture named MyData in editor , and Blueprint Function in c++ .
static int myFunction(UUserDefinedStruct DataTable); this DataTable can connect to MyData
static int myFunction(UPARAM(ref) TArray& DataTable); this DataTable can not connect to MyData Array.
Thanks xlar8or, My mistake ,Non Aarray Version can not connect too, only select from list . How to make it connect . MyData Node is a reference of structure created in editor.
UFUNCTION(BlueprintCallable, meta = (DisplayName = "My Test Bp function", Keywords = "Test Bp function "), Category = "MyBpLib")
static int myFunction(UUserDefinedStruct* DataTable, int32 Count);
UFUNCTION(BlueprintCallable, meta = (DisplayName = "My Test Bp Array function", Keywords = "Test Bp function "), Category = "MyBpLib")
static int myFunctionArray(UPARAM(ref) TArray<UUserDefinedStruct*>& DataTable, int32 Count);
When you drag the wire from the variable to the function parameter what is the error he’s saying? “is not compatible with User Defined Struct object reference”?
That is the weird thing here, when you create a struct it is supposed to create a user defined struct (at least thats what it says when you over struct in the add new new > blueprints > Structure, but maybe he uses a different type in the end, i’ve tried with UStruct pointer, UObject pointer as a parameter and nothing works.