Unreal Engine 5 Tutorial - Data Assets

Поделиться
HTML-код
  • Опубликовано: 26 фев 2023
  • Learn about Data Assets. What they are and how they can be used in a project.
    SUPPORT ME
    Patreon I / ryanlaley
    Buy Me a Coffee I buymeacoffee.com/RyanLaley
    Donations I paypal.me/ryanlaley
    PRIVATE 1-2-1 SESSIONS
    Email me at support@ryanlaley.com for more information and rates, or visit www.ryanlaley.com/sessions
    JOIN THE COMMUNITY
    Discord I / discord
    FOLLOW ME
    Twitter I / ryanlaley
    Facebook I / ryanlaleygames
    Instagram I / ryanlaleygames

Комментарии • 64

  • @dreamingacacia
    @dreamingacacia 10 месяцев назад +14

    Come back after 5 months and watch this again. I finally see good use cases and the performance doesn't seem to be much of a problem. Rather it might be even better than using data table both performance and efficiency.

  • @murnoth
    @murnoth Год назад +4

    Thank you for all the work you do making these videos, It's all been really helpful for me learning this stuff the past 16 months

  • @TrojanLube69
    @TrojanLube69 Год назад +10

    So unique they made possible to use data assets in blueprints. The c++ was very useful and more practical than data table specially when working with someone else, it reads and writes faster, or to preserve data with less probability of data loss for example when creating a new map variable or modifying structures, enums, etc inside a datatable.

  • @ABCBCACB
    @ABCBCACB 27 дней назад

    Thanks for the great tutorial! It was straightforward and the examples were perfect to understand.

  • @TOMAvatars
    @TOMAvatars 5 месяцев назад

    Super cool to know this, very clear! Thank you!

  • @RolyPolyGames
    @RolyPolyGames Год назад +3

    7:30 is so useful.
    I was using an awful c++ #ifineditor code that you have to comment out / get rid of before this to pull data asset info to set it on model during pre-construct etc.
    Edit: 8:30 I am screaming I spent so long looking for stuff like this. Originally I was doing it as a TArray instead of a TMap and realizing the woes it caused without an ID to verify it. Not to mention with item lists you want them hashed instead of arrays. This video is seriously gold. There is so little on Data Assets I had to gut my way through it blind for the most part.

  • @AUweaverzone
    @AUweaverzone Год назад +3

    I was just reading documentation on Data Assets and thinking about how to apply them to my inventory system today, what a coincidence!

  • @TSA_CoRe
    @TSA_CoRe 7 дней назад

    Thank you so much, This was I was looking for and you nailed it (again) :-)

  • @kimochisaiko6442
    @kimochisaiko6442 Год назад +1

    Excellent video

  • @justinwhite2725
    @justinwhite2725 4 месяца назад

    Thank you. Coming over from unity and was looking to see if there was a feature that works like Scriptable Objects.
    When you said that you can add functions i was sold.

  • @marcthenarc868
    @marcthenarc868 3 месяца назад +1

    Slight mistake at 1:27: FindRow doesn't iterate the table. The table's container is a TMap of row structures so the find function returns as quickly as any other TMaps. That's why you have a mandatory Row Name at the beginning of your row: it's the row's key.

  • @user-nq8pu9cp1u
    @user-nq8pu9cp1u 4 месяца назад

    thank you for explaining

  • @doomstarrobo7807
    @doomstarrobo7807 10 месяцев назад +3

    I've been using Structs and Arrays, but this looks a bit better.

  • @ReOp14
    @ReOp14 Год назад +8

    I stopped using Data Assets because of the bugs (5.1). One bug was that if you change a struct, all structs within the struct and the struct itself will reset all it's values. The other bug was that the data asset would reset all it's values EVERY TIME you restart the engine. I found that this happened only if you had very complicated structs in your data asset. I heard a rumor that it's because of enums being in a struct but im not sure about that.
    As a replacement I made my own data asset by just making a child class of an object.

    • @lospe85
      @lospe85 9 месяцев назад

      Assuming you are using Objects for an inventory system. Do you know how to make sure that the object is destroyed after using it? For example, lets say you have your OBJ_ItemMaster with basic item info, then you have a OBJ_Weapon as child with exta variables (lets say Current and max ammo, fire rate, etc). You discard the weapon from your inventory and it needs to be destroyed. It is not enough to remove you object from the array (player inventory), because it would still be in memory. I have read that in order for an object to be grabbed by the garbage collector it needs to be properly nulled it out, this is clearing all references to it. But how to make sure removing it from the array is enough? rephrasing: how are you deleting/destroying this object instances when they are no longer needed?

    • @ReOp14
      @ReOp14 9 месяцев назад

      @@lospe85 I haven't thought of how the garbage collector would work in this case. I thought the weapon object would be garbage collected if there is no more references to it (including if the struct or object containing the reference is destroyed), and if all references to the OBJ_ItemMaster are gone, I.E. deleted from the character's inventory, then it would be garbage collected. Do you have a way in the editor to check if something has been garbage collected or not?

  • @sahildali7707
    @sahildali7707 Месяц назад

    Thank You.

  • @Frappudazzu
    @Frappudazzu 16 дней назад

    Great tutorial, is it possible to add variants on the same data asset? For example : flowers with different colour or shapes

  • @carlosrivadulla8903
    @carlosrivadulla8903 Год назад

    it's a good practice to place functions in ur data assets instead of creating interfaces?

  • @IIStaffyII
    @IIStaffyII Год назад +7

    Hey great video man.
    DataAssets are NOT read only.
    I usually private my variables and make a get function. In order to avoid it being accidentally overwritten.

    • @bartasus194
      @bartasus194 Год назад

      But they were meant to be read only. You can change values on them, but you should reconcider if you don't want to use another data type

    • @SuWoopSparrow
      @SuWoopSparrow 3 месяца назад

      @@bartasus194 What data type would that be? Data tables are read only, what would I use if I want to make a database of things while being able to change their values through editor scripting/logic?

    • @bartasus194
      @bartasus194 3 месяца назад

      @@SuWoopSparrow You should use UObjects then. And probably have some kind of manager to store them.
      UObjects are meant to be instanciated and changed

  • @ChrisWaitt-uq3xi
    @ChrisWaitt-uq3xi 2 месяца назад

    Thanks for the great tutorial! I'm trying to setup multiple spawners for each item and in SpawnActor there I can't find a way to specify the data asset for that actor. is this possible? thanks

  • @meanderingdev
    @meanderingdev 3 месяца назад

    When you use a data asset does that create a reference? Because one of the reasons in my data-driven stuff I use data tables is that you're just passing a name around rather than having to hard reference an asset.

  • @AkitaMix
    @AkitaMix Месяц назад

    the most important question is how to dynamically find the DA so you can use it inside the bp?

  • @pHaace
    @pHaace 9 месяцев назад

    So what if i want to use these for a skill system maybe? cause idk how best to do a rpg skill system and tutorials are hard to find for such a use

  • @space_mex_og1795
    @space_mex_og1795 Год назад +1

    How would you implement this into a ui inventory?

  • @ZaynNaz
    @ZaynNaz Год назад +1

    Good video, if you’re making a large game with a lot of items or things of that nature is it still good to use data assets?

    • @jamesgtmoore
      @jamesgtmoore Год назад +3

      No , for large numbers of items, a data table is much better but what I do is at the Init event, in the Game Instance, I copy all data tables to their own array because data tables are read only. Arrays are not. Then I use the arrays in my various blueprints. You can also export data tables to CSV file format, edit them in a spreadsheet program and import them back into the data table again.

    • @soldieroscar
      @soldieroscar Год назад

      @@jamesgtmoore how do export to csv file format?

    • @jamesgtmoore
      @jamesgtmoore Год назад +1

      @@soldieroscar datatables can be exported using the right-click menu

  • @soniclee1764
    @soniclee1764 Год назад

    im using a data asset for settings for the player works fine in editor but when i package the build it wont save or load the data can you please help!

  • @FedericoMarta17
    @FedericoMarta17 11 месяцев назад

    How can I read the property of this ? it gives me an error when I try to insert it in the item it cannot find the reference

  • @JoshLathamTutorials
    @JoshLathamTutorials 5 месяцев назад

    How would you have them selected randomly? That's the main reason why i'm using data tables.

  • @aufgespielt3768
    @aufgespielt3768 10 месяцев назад +1

    But what is the advantage about a regular Actor Blueprint (parent and child) to use it as an Item? In a Blueprint i also saw a Mesh preview by the Way. Thanks Ryan.

    • @yonjuunininjin
      @yonjuunininjin 10 месяцев назад +1

      They are cheaper, you don't want to create a whole Actor (with a bunch of other variables that will be loaded into memory) just to hold some data.

  • @anaboliczyakrobata1909
    @anaboliczyakrobata1909 9 месяцев назад

    I have a question! Is this possible to put the table of attributes in the gameplay? Maybe as widgets? My idea is to bulid the level of database of mesh models, and thanks to table of content manipulate it.. For example hide all models from one type or show only models show only those models that meet certain characteristics

    • @ethanwasme4307
      @ethanwasme4307 8 месяцев назад

      you may potentially want to use gameplay tags for things like this so you can have multiple keywords you can toggle with a UI checkbox or such,,,
      i'm a noob but you can maybe loop through all the array elements and if something has the tags for "Building, Destroyed" then show them in the umg grid or whatever container you use

  • @dreamingacacia
    @dreamingacacia Год назад

    So this is basically just self-complete data table. It's a higher form but could become more costly. Would love to try it, but I'd need to see more use cases before I get the ideas of how would I use this instead of just using the data table.

    • @shaqm0bile
      @shaqm0bile 8 месяцев назад

      Yeah this is exactly what i was thinking. The data assets being able to run their own functions on themselves is cool, but other than that it just seems like data tables that are messier to manage. I'm sure there's a super useful case for them (and they are probably working on that as they grow the feature) but for now, even in 5.3, it seems not very useful.

  • @magnawiz
    @magnawiz Год назад

    I'm making a cooking game with different dish recipes and combinations of ingredients. Should I be using data tables or data assets?

    • @tjrizvi251
      @tjrizvi251 Год назад +2

      I would assume data tables?

    • @magnawiz
      @magnawiz Год назад

      @Ray Edwin I see. I've also been experiencing some bugs with 5.1. Mainly with UI stuff.

  • @allanph2416
    @allanph2416 Год назад

    Does it work the same way in UE 4.27?

  • @GhostRat__
    @GhostRat__ 3 месяца назад

    Me 5mo I'll never use data or struct.
    Why are you setting that individually separate from a struct labled level variables?

  • @kelvinmartinezfontanez5705
    @kelvinmartinezfontanez5705 4 месяца назад

    I just use a data table to randomize loot in chests, using this data asset method, is there a way to do the same?

    • @zablade
      @zablade 4 месяца назад

      Idk if you found a way to do this in your project yet, but I'd have the chest run a function that randomly select data assets to spawn inside the chest when you interact with it.
      For example, you could randomize the amount of loot that spawns in a chest first, then use a for loop to randomize the data asset spawns that many times. Implementation is entirely a design choice, but relatively the same.

  • @Kappinski
    @Kappinski Год назад +1

    Can I make a Data Table of Data Assets?

  • @HKgunner
    @HKgunner Год назад +7

    1:00 | 5:53 - Click those timestamps over and over again for an authentic Deep Rock Galactic experience.

  • @MEMUNDOLOL
    @MEMUNDOLOL 9 месяцев назад +1

    whats the point, i see no diff with just using data tables and structs

    • @allashama
      @allashama 6 месяцев назад

      I also dont see. With Data Assets you end up with 130 assets lol, 1 for every objects you have, like weapon, food, decorative stuff...
      I think i still would use DataTable with Structure then using DataAsset.

  • @marcapouli7805
    @marcapouli7805 9 месяцев назад

    Finally after 10 yars of hard work, I realize I don't know 1% of the engine, and I understand why I never earned a cent. Maybe in 100 years I will know enough to make a game. Oh wait, in 100 years there will be so many new features I will still be at 1%. Completely demotivating and depressing.

    • @marcapouli7805
      @marcapouli7805 6 месяцев назад

      ​@@ericfieldman This is what I always tried to do, the first issue is to come up with something cool. Game design is a whole competence, anything I think is cool isn't cool for others.
      Then I agree about researching the steps, but that isn't that simple. Each step requires professional expertise, and is just a succession of unplanned issues that I can't solve at some points.
      When I spend entire weeks on a particular problem and don't find the solution, I have 3 options. Paying a professional 1 year of my income for 1 or 2 hours of work but I already struggle to eat (I live with social minima), asking for help but people on the forum only speak to themselves, I have stopped trying to get answers there several years ago since there is no answers. Last option is the one I always "choose", give up the project and try another cool one that I will give up at some point. That is the loop I'm stuck in for a long time now.

    • @garethanderson6980
      @garethanderson6980 5 месяцев назад

      @@marcapouli7805 Dont beat yourself up, everyone and i mean literally everyone goes through this, it takes time and i mean years to understand completely everything with tools like unreal. What I tend to do is just dot around watching videos go outside make myself busy doing less complicated stuff if im stuck on things.

    • @Zslaboratories
      @Zslaboratories 5 месяцев назад +3

      Even the people building unreal don't know everything it has, you don't learn the entire engine then make a game, you design your game then start building it and learning needed things as you go along. 1 or 2 basic game courses to go through full steps on a small learning project first is enough then get cracking on your game

    • @ericfieldman
      @ericfieldman 5 месяцев назад

      @Zslaboratories I'm realizing over time that learning just for the sake of learning can be fun, but it should never get in the way of keeping your world small enough to navigate and building it purposefully. Every new electronic advancement wouldn't exist if electronics weren't popularized by earlier devices, and those earlier devices wouldn't exist if we didn't discover electricity in the first place. If you get in the mentality of "I'm not legit cause I don't see more of the bigger picture" it's a neverending journey trying to do that that you won't enjoy, because fundamentally you're trying to prove you can do something inhuman and eternally failing. Best we can do is say "that's above my pay grade" and clarify what we want to see, and then make it happen, focusing entirely on the task itself unless we want to go bigger and have a truly good reason to do that. Otherwise, trust that whatever info we need will come to us when we need it to if we do a bit of looking

  • @dreamsComeTruePL
    @dreamsComeTruePL 10 месяцев назад +3

    There is no advantage to regular DataTables. It's more tedious/more clicks to create/edit these singular resources, than just adding another entry in the table. Also table is more versatile, you can search it, filter, sort, etc. You can write static functions/Blueprint Function library - to act on rows in DataTables as well.
    You haven't discussed ANY noticeable advantage of using them compared to good ol' DataTables, sorry.. :(

    • @ethanwasme4307
      @ethanwasme4307 8 месяцев назад

      1:03 bruh... literally dismantled your entire argument, go back to shiidot and learn the basics and (some manners) before moving onto visual scripting

  • @DailyPaily
    @DailyPaily Год назад +9

    More tedious work.

  • @user-li7ce3fc3z
    @user-li7ce3fc3z 26 дней назад

    Нужно больше информации про async load primary asset