Function and Macro Libraries

Поділитися
Вставка
  • Опубліковано 19 бер 2024
  • There's a lot of side functionality and quality of life things in unreal engine. One of which is the ability to make macro libraries and function libraries. Today we'll take a look at both of them, how the differ and what use you can put both of them to!
    Join the discord for any help you need! : / discord
    Join this channel to get access to perks:
    / @thegamedevcave
    support the channel and development over on patreon : / thegamingcaves
    Get personalized Coaching : www.fiverr.com/s/2P9GaN
  • Наука та технологія

КОМЕНТАРІ • 7

  • @jesusofamerica7043
    @jesusofamerica7043 3 місяці тому +3

    My dude, greetings from Canada. You are the best teacher I could have ever found. Not only do you describe things plainly and in terms anyone can understand, but you also explain that there are other valid methods too, and encourage ourselves to practise around. You don't just say "Ok do this. Don't ask why. Now add this. Don't worry about what that does" like some of the channels here I won't name. They show you how to create something that is good for exactly one situation with no scalability. Not the case here. I'm so happy I found your channel, it has been beyond helpful and even goes into subjects I would never have thought of or had no idea even existed. Hard VS Soft refences? What the hell is that and why haven't I heard about it? Well now I know, and I'm absolutely going to remember it. The most friendly and pleasant experience I've and I cannot state this enough. Never ever stop!! I never ever do the comment thing but I really just needed to tell you how much of a huge figure you've become for me.

  • @segfault4568
    @segfault4568 3 місяці тому

    Another cool feature of Macros is you can use Nodes which you can't use inside functions, these includes things like Timelines, Delay nodes and other latent nodes(If I am not mistaken), which is why I only ever used Macros in unreal engine other than that Blueprint Function library is far more superior in every sense.
    As for C++ I read somewhere that although Unreal uses a lot of macros for reflection system but it is recommended to use inline functions instead of macros for gameplay related purposes.

    • @thegamedevcave
      @thegamedevcave  3 місяці тому

      I have a video coming soon similar to this that talks about events vs functions. originally it also talked about macros but I decided to make this video instead.
      Since macros are just a set of nodes collapsed into 1 node to re-use it's really just the same as copying over a bunch of nodes whenever you use a macro.
      Important to note though that macro's don't really replace either events or functions, inside a single blueprint, they're super useful but i don't think they can't be called from another class like a function or an event can.

  • @joel-BB
    @joel-BB 3 місяці тому

    great video please keep em coming! I don't really understand the point of macro libraries though. For function libraries it makes sense a bunch of generic functions that you might need all over your project ezpz. But for macro libraries if it needs to inherit from a particular class anyway whats the point of not just throwing the macros directly in the parent class?

    • @thegamedevcave
      @thegamedevcave  3 місяці тому

      let's say you have 50 different characters in your game. maybe 20 of course are one branch of child classes, and then 10 of them are a whole separate branch of child classes, a handful directly inherit from character and so on. in those cases making a macro library for character will allow you to use those macros inside all of your 50 different child characters.
      when you make a macro library any class of that type in your project, as well as classes that are children of it will be able to use it. (specifically with classes that the engine provides like actor/pawn/character and so on, because you really dont want to go in and edit those)

    • @thegamedevcave
      @thegamedevcave  3 місяці тому

      to add to that comment, i just had to check real quick, macros only exist inside the class you make them for, not any of it's child classes.

    • @joel-BB
      @joel-BB 3 місяці тому

      @@thegamedevcaveYeah that makes sense actually thank you!