Announcement

Collapse
No announcement yet.

C++ Blueprint Callable Array passed by reference treated as return value on Blueprint Node.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Thanks that worked like a charm for SetKeyboardKeyColor.
    https://github.com/tgraupmann/UE4Chr...Library.h#L277

    Leave a comment:


  • replied
    const references are treated as blueprint function inputs

    Leave a comment:


  • replied
    this info should be added to this page:
    https://docs.unrealengine.com/latest...ons/index.html

    along with better examples of how to control input and output pins, explaining when you are allowed to use OUT parameters, explaining whether you can use Const with static functions, etc...

    Leave a comment:


  • replied
    Oh that worked. Thanks. Oddly enough when I search UPARAM I find basically no documentation.

    Leave a comment:


  • replied
    Try to use "UPARAM(ref)".

    Code:
    UFUNCTION(BlueprintCallable, meta=(DisplayName="Invalidate_Guid (Guid)"), Category="Guid")
    static void Invalidate_Guid( UPARAM(ref) FGuid& InGuid );

    Leave a comment:


  • C++ Blueprint Callable Array passed by reference treated as return value on Blueprint Node.

    I am trying to make this BlueprintCallable C++ method:

    Code:
    UFUNCTION(BlueprintCallable, Category = Inventory)
    static void SortInventoryWidgetsByType(TArray<class UWRInventoryItemWidget *>& InventoryWidgetArray);
    I am modifying the Array in C++ that was passed in from Blueprint. As you can see from the function name I am doing some Sorting on the TArray and modifying the input value.

    However in Blueprint I can't pass in the array. It doesn't appear on the left side of the node. It's instead on the right side and is being treated as a return value. It's the same thing as if I made this an OUT parameter, but I need it to be an IN parameter.

    I read one answer somewhere about marking the TArray as const to make it an IN parameter but that won't work for me since I'm modifying the Array. (Heh unless I do some dirty C style typcasting to remove the const qualifier MUAHAHAHA)
Working...
X