# Custom Macro Library from within Widget

**URL:** <https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195>\
**Category:** UI\
**Tags:** macro-library, unreal-engine, Widget, question\
**Created:** [May 2, 2015, 9:59am UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195 "2015-05-02T09:59:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Otreum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Otreum](https://forums.unrealengine.com/u/Otreum)\
**Post date:** [May 2, 2015, 9:59am UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/1 "2015-05-02T09:59:16Z")

</div>

This is a straight forward one really.

I can’t seem to call a function from my custom macro library from within a widget blueprint.  
I can call the functions from other blueprints, but just not the widget blueprint.

Is there a way I can do this, or do I need to create a macro inside of the widget?

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [June 19, 2015, 3:28pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/2 "2015-06-19T15:28:44Z")

</div>

Same question here 🙂

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [June 19, 2015, 3:37pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/3 "2015-06-19T15:37:15Z")

</div>

Just solved it, you need to have a special Macro Library for Widgets. When you create a macro library, there is a step to specify parent class. When you select Actor class, the macro library will be for Actors. To use macro library from Widgets, create a new macro library choosing “UserWidget” as a parent class.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [September 1, 2016, 9:34pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/4 "2016-09-01T21:34:59Z")

</div>

Just stumbled across this problem again and surprised myself that I’ve answered this, I didn’t remember it 😃 … So basically the past-version of me answered my current-version of me. Interesting.

If my answer has helped, could you please accept it? 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![Otreum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Otreum](https://forums.unrealengine.com/u/Otreum)\
**Post date:** [September 1, 2016, 9:42pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/5 "2016-09-01T21:42:23Z")

</div>

Lol, I didn’t even see the answer, and completely forgot I posted the question.  
That’s how I ended up doing it, so yes, you’re absolutely right haha XD

---

<div class="post-metadata">

**Author:** ![Alenoba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alenoba](https://forums.unrealengine.com/u/Alenoba)\
**Post date:** [October 29, 2018, 10:29pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/6 "2018-10-29T22:29:18Z")

</div>

So you basically need to make two versions of your macro library? Isn’t there a way to make a library available on both Widgets and Actors?

---

<div class="post-metadata">

**Author:** ![t0msk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/t0msk/32/614638_2.png) [@t0msk](https://forums.unrealengine.com/u/t0msk)\
**Post date:** [September 21, 2020, 1:35pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/7 "2020-09-21T13:35:18Z")

</div>

You can, but you have to define parent class as Object.

---

<div class="post-metadata">

**Author:** ![icierva](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@icierva](https://forums.unrealengine.com/u/icierva)\
**Post date:** [June 21, 2023, 8:32am UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/8 "2023-06-21T08:32:57Z")

</div>

no such option, @t0msk

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/d/e8d4131e9e4ae8127985981d14f6159cbb8701bc.png)

(no big deal, I’ve just copied a couple of macros from the Library to the widget, but still curious.)

---

<div class="post-metadata">

**Author:** ![TheFlyingEpergne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/theflyingepergne/32/945825_2.png) [@TheFlyingEpergne](https://forums.unrealengine.com/u/TheFlyingEpergne)\
**Post date:** [September 22, 2023, 2:35pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/9 "2023-09-22T14:35:52Z")

</div>

this is true but unfortunately if the parent class is Object you can’t have latent functions in the macro - a major reason I use a macro library at all!

---

<div class="post-metadata">

**Author:** ![Nizami\_Nz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nizami\_Nz](https://forums.unrealengine.com/u/Nizami_Nz)\
**Post date:** [June 6, 2025, 4:55pm UTC](https://forums.unrealengine.com/t/custom-macro-library-from-within-widget/317195/10 "2025-06-06T16:55:24Z")

</div>

My pleasure)  
UE5.4.4

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/7/5678635c8668b2e0d1cdd79313650025d2130656.png)
