What is a Macro? And what is a Blueprint Macro Library? | Unreal Engine 5 Tutorial

preview_player
Показать описание
👨‍🏫 My Patreon link:
Download Project Files | Premium Tutorials | Courses

🕹️ Get our Game on Steam | The Anomaly Project:

---

In this video we take a look at what Macros are, what a Blueprint Macro Library is, how we can use them to our advantage, and why you should be using them in your projects.

Blueprint Macro Libraries allow you to re-use your handy Macros throughout your classes. No more need to write specific Macros on a per-class basis.

I also explain the differences between Macros and Functions, and what the Pros and Cons of each are.

🛒 Checkout our awesome Marketplace products and learn more about Unreal Engine:

#unrealengine #macro #tutorial #blueprintmacrolibrary

---

Welcome to Kekdot!

👨‍🏫 Our Patreon - Download Project Files | Premium Tutorials | Courses:

🛒 Our Unreal Engine Marketplace Templates:

👾Join our Discord:

📆 We upload videos on a weekly basis

📰 Follow us on:
Instragram: @kekdotyoutube
Twitter: @kekdot
Reddit: @kekdot
Рекомендации по теме
Комментарии
Автор

Hey guys,

👨‍🏫 My Patreon link:
Download Project Files | Premium Tutorials | Courses

💦 Get our Game on Steam | Kekdot Center:

Kekdot
Автор

Few notes about macros:

1. You can use variables in macro, check the foreach. You can create it but you have to use it through directly connected nodes.

2. The reason macro can use Delay (asynchronous actions) is because the macro will be copied into your code. Functions are REUSABLE code that is created once per class/actor. Macro is duplicated and runs on main thread like your BeginPlay and so on.

3. Function has one return/result. Macro is just a wrapped code chunk so it can have multiple output nodes. It is literally just piece of your code hidden under a name.

MarekZeman
Автор

It looks like you can only use macro libraries in the child classes of the class you derived them fore. Generally it's not a big issue but in can you want to have a blueprint class that has fields, and you want to have macros that operate on those fields using macros in both the main class and its children, you will have to define a parent base class with all the fields and virtual functions you plan to call in your macros.
Or just have 2 copies of each macro - in class itself and in the library

Felik
Автор

I think this is what I was looking for

jcrvzz
Автор

The more I use Blueprints the easier C++ becomes for me, lol.

iblisellis
Автор

Building an Unreal project is like building a house.

speedwaylabsdev
visit shbcf.ru