# How to use organise blueprint inputs and outputs in c++ using templates?

**URL:** <https://forums.unrealengine.com/t/how-to-use-organise-blueprint-inputs-and-outputs-in-c-using-templates/318515>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, Blueprint, question\
**Created:** [May 13, 2015, 7:33pm UTC](https://forums.unrealengine.com/t/how-to-use-organise-blueprint-inputs-and-outputs-in-c-using-templates/318515 "2015-05-13T19:33:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Megakoresh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Megakoresh](https://forums.unrealengine.com/u/Megakoresh)\
**Post date:** [May 13, 2015, 7:33pm UTC](https://forums.unrealengine.com/t/how-to-use-organise-blueprint-inputs-and-outputs-in-c-using-templates/318515/1 "2015-05-13T19:33:43Z")

</div>

More of a theoretical question, as the official functions made by Epic, seem to use the unstructured approach:

I have a function library, and one function takes in quite many values. Instead of writing them out as const references in one enormous line, I’d rather make some kind of template or struct that would organize them, but still show them as separate input pins in the blueprint editor. Something like

```
struct FunctionData {
  struct Inputs {
    APawn* TargetPawn;
    float SomeValue
    //and so on
  }
  struct Outputs {
    float ChangedValue;
    FVector SomePawnVector
    //etc.
  }
}

```

And then in function declaration i’d do something like

```
UFUNCTION(BlueprintPure, Category=Chemistry)
static void ILikeTurtles(const FunctionData::Inputs&, FunctionData::Outputs&)

```

And it would take FunctionData::Inputs and break it up into separate pins, and the same with FunctionData::Output.

I don’t even know if it makes sense from a C++ standpoint, as you can probably tell I am new to this, however if there is a way to organize inputs and outputs of blueprint function in a similar way, I would like to know.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8e2766aa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8e2766aa](https://forums.unrealengine.com/u/anonymous_user_8e2766aa)\
**Post date:** [May 14, 2015, 7:59am UTC](https://forums.unrealengine.com/t/how-to-use-organise-blueprint-inputs-and-outputs-in-c-using-templates/318515/2 "2015-05-14T07:59:38Z")

</div>

Hello, Megakoresh

To learn about receiving a Struct in a Blueprint function, please go here:

[[Tutorial] How to accept wildcard structs in your UFUNCTIONs - Community & Industry Discussion - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?56537-Tutorial-How-to-accept-wildcard-structs-in-your-UFUNCTIONs&p=206131#post206131%29),

Please also note that there some specifics regarding creating Structs in Unreal Engine 4. If you like to learn more about them, please go here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

Hope this helped!

Good luck!

---

<div class="post-metadata">

**Author:** ![Megakoresh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Megakoresh](https://forums.unrealengine.com/u/Megakoresh)\
**Post date:** [May 14, 2015, 8:12am UTC](https://forums.unrealengine.com/t/how-to-use-organise-blueprint-inputs-and-outputs-in-c-using-templates/318515/3 "2015-05-14T08:12:04Z")

</div>

Many thanks.
