# Function like Ease

**URL:** <https://forums.unrealengine.com/t/function-like-ease/407244>\
**Category:** Blueprint\
**Tags:** unreal-engine, editor, functions, CPP, Blueprint, question\
**Created:** [October 17, 2017, 4:26pm UTC](https://forums.unrealengine.com/t/function-like-ease/407244 "2017-10-17T16:26:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frost\_FX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@frost\_FX](https://forums.unrealengine.com/u/frost_FX)\
**Post date:** [October 17, 2017, 4:26pm UTC](https://forums.unrealengine.com/t/function-like-ease/407244/1 "2017-10-17T16:26:08Z")

</div>

I would like to create a function that will be similar in some cases to the function of Ease. Specifically, I’m interested in possibility of adding and/or replacing pins, which the function can take. In the second screenshot, you can see how after switching Enum to the function of _Ease In_ (for example), we get the pin of _Blend Exp_. **I want to note that I’m not interested in Wildcard now, for me enough of functional, which I described above.**

In general, I was trying to find a method by which the Ease was built and apparently found it in the source files (K2Node\_EaseFunction.h/cpp), but it seems too difficult for me at the moment. So, if someone pushes to possibility of learning this method in more “simple language”, I will be very grateful.

![216978-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/e/f7e468a2acdb13d6bbce8b2e92bcd0fcd1c6eb22.png)

![216979-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/2/7b2ab59f25cc7d818ac329eb7a9419f92ebd4511.png)

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [October 17, 2017, 7:35pm UTC](https://forums.unrealengine.com/t/function-like-ease/407244/2 "2017-10-17T19:35:25Z")

</div>

There is not other way to do so thats why this function has custom K2Node, same like SpawnActor which do auto casting of output pin, BlueprintCallable is quite limited and you can check all meta options it has by looking in to K2Node\_CallFunction (which is function call node), but i don’t see any options you looking for. It’s really hard to do so as optional arguments are not a feature of C/C++, there only default values for arguments which kind of could work that way.

Don’t get get overwhelmed by K2Node\_EaseFunction and focus, you simply need to define UI behavior of the node, Study each function one by one and see what they do and try to replicate what it do, each function has a role and your code need to fullfill it there also lot more function you can override in K2Node (ones with V icon):

[UK2Node | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/API/Editor/BlueprintGraph/UK2Node/index.html)

This node in perticilar seems to work like a macro, in ExpandNode() code creates virtual K2Node\_CallFunction, binds ease function UFunction from KismetMathLibrary and virtually repin all the links to new pin so it executes that function in C++. Try to mimic what it is doing.

Here some other example in just found maybe it will be simpler for you:

> **[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...

There one thing i would remove from there and that is Blueprintable, BlueprintableType as this class wont be even usable in blueprints anyway.

Also note that as this tutorial suggest you should create editor module for this as editor APIs wont be avable during packaging and final game you will get compile errors, in normal game project modules are defined in uproject file in case of plugin it is uplugin as tutorial suggest

---

<div class="post-metadata">

**Author:** ![frost\_FX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@frost\_FX](https://forums.unrealengine.com/u/frost_FX)\
**Post date:** [October 17, 2017, 8:14pm UTC](https://forums.unrealengine.com/t/function-like-ease/407244/3 "2017-10-17T20:14:18Z")

</div>

Well… apparently it will be a big challenge, a big deal) I will follow all your advice, because after everything that was said, read and done, stopping means the same as changing the principle. Many thanks, I’ll keep up to date!
