Download

Usage of macro from custom Blueprint Macro Library, if BP inherited Actor Component

When I edit the BP that inherites Actor Component,
I couldn’t find Macros of Macro Library I made, in the context menu.
(But I can find Macros of Standard Macro Library, even in this case. For example, Reverse for Each Loop.)

What I find something difference is:
Parent class of Stnadard Macro Library from Unreal Engine is Object.
Parent class of Macro Library that I made is Actor.

I solved this problem by Blueprint Function Library. But It feels silly, still.

Any good ideas?

@HyalineV Do you mean a BP that has parent class Actor?

It’s basically the difference that you already noticed between the standard macro library & the custom one you created. When you define the parent class for a macro library, you’re essentially saying that only objects of that particular class (& its children) can use the macros defined in the library.

So by choosing an actor as the parent, those macros can only be used in actor blueprints. On the other hand, if you create a macro library using the actor component as the parent, those macros can be used in actor components, but not actors.

If you want your macros to be usable in both actors and actor components, you will have to use a parent class from which both of them are derived from. So using an Object as the parent (just like standard macros) should do the trick.

I mean, I want to use some Macro what I made, in my BP. And this my BP has parent class Actor Component :slight_smile:

Wow! I do appreciate to you. Because of you, I can totaly understand about those things! And I can use macro in my ActorComponent BP from now! I’m Happy :D!!! Thank you!

So, I got these now lol

1.jpg

I will move macroes to MacroLibraryBasedOnObject, from other 2 macro library:)

I learned function library at this opportunity, and there is differences within the macro library and the function library, So I want to remain function library:)

Thank you!