#UE4
HTML-код
- Опубликовано: 8 сен 2024
- This is generally my preferred design paradigm for defining gameplay mechanic data and systems.
This is something I've had to explain internally on many teams and I was finally motivated to make a public video about it.
Project download for UE4.26.1
drive.google.c...
You call it a "rant," but in my circles, we'd call it a "lecture" and expect the audience to listen. :) Thanks for sharing your insights here. I hope you'll do more like this in the future.
I really like the data-design or data-driven approach, I'm using it in a tower-defense-ish game. Where each tower is just a Data Asset, and I only have 1 BP for towers called BP_Tower that loads all the data in the data asset, instead of having tons of blueprints deriving off a base bp that only has different data
Your analysis accurately reflects the challenges I encounter during my development. I'm really grateful for sharing this video. I'll definitely acquaint myself with your other valuable insights as soon as I can apply this knowledge in practice. I'm filled with enthusiasm and looking forward to the next steps :)
I will bookmark this video for when im ready to absorb this wisdom
This was phenomenal. Thank you for taking the time to record all of this!
Thanks Allar!. Its always great to see a different perspective on a system than just the raw documentation.
Omg, more of these videos PLEASE. This completely introduced me to data assets in a way that solves so. many. of my issues.
Thanks for this Rant, Michael. You finally pushed me over the edge, I have been putting this off for at least 6 months, now I realize this could have saved me the last 6 months. Integrating data asset workflow into my current game, compiling while I type this.
Auto discoverability sold me. Completed the entire video btw.
Great Tutorial! Thanks!
time to practice this and use it, literally is going to make life a lot better. I'm excited about the performance potential of this too!
Very informative video, explained very well. Maybe could use a better example or show visual examples (image, video) of how it would be used in other games, i.e. proxies and data assets in Diablo 3 or RPGs.
I'm glued to my seat, waiting for a part 2 😄
Thanks, man! I'm building a blueprint-only RPG framework, which already relies heavily on interfaces, and this was the "missing" piece I didn't know I needed. I have a dozen datatables to rip up now! LOL
Thanks! I used to wonder how this system worked. I still wonder, but I used to, too.
Very informative and nice Allar! thanks for the upload!
Waiting for 1080p processing on an hour long video, the struggle for free transcoding is real
it's like booting up your computer in the early 2000s
As a beginner this was the part that was the most confusing for me.
1. Tried making gameplay assets with actors, got confused by how to pull default values out (and they would mystically disappear so I'd lose data!)
2. Saw the asset manager system, got super confused from the complexity (and my lack of C++ knowledge) and just gave up
Very interesting ! You spoke a bit about loading/references, but not really about saves - which is perfectly fine. I personnally still struggle to find the best way to have data driven save/load systems especially when it comes to dynamically spawned things. If you have an opinion about this I'd be glad to know.
18:30 I wish you would have lead with that because up until that point I was 100% confused.
As odd as it seems, this is literally the only video I have ever seen about the Asset Manager......that Actually gave Context to it by explaining how you would use it with an Example. All the other videos I have seen try to describe what it is without ever introducing any examples LOL.
Finally Found After 2 years.. Thanks For this Rant and Do You have any idea to do an part 2 of this video since Asset Bundling Concept is missing
you are a savior
Great stuff!!
It's all about THINGS 😛😛
take a shot every time he says 'thing'. RIP! (the video is very helpful thanks)
If I want my game to have pickupable and droppable items. I would use proxy items in the world with a data asset of that item and have the proxy be destroyed or pooled when picked up, or spawned back when dropped?
If I wanted to show UI icon of that item in my inventory or quick slot, I would get a reference to the item data asset and soft load a texture when needed? How would I make sure that there is minimal delay in loading that texture? Is there a way of preparing to load some assets into RAM, because you know that you will use it? Should I just have a big sprite atlas of icons split by category and DLC and just load a needed atlas?
So in a nutshell, is this thing useful when you want your gameplay data to be more discoverable and loading / unloading on demand for content-heavy games?
I sat through the whole thing. While the topics discussed are important and while you did manage to convince me, the introduction (first 20-ish minutes) was excruciating to watch. You kept on switching between examples without sticking to just one, you didn't get the motivation across clearly, the asset/data terminology started to mingle, and I felt more confused than ever. It felt like the intro had no structure and involved little preparation, so I'm letting you know (just for feedback purposes) that that introduction format did not work.
Thank you for taking the time to make this!
what the hell is proxying?
Thank you for your video, I downloaded your project and it works with the content you have, but I tried to create a new c++ primarydataasset, configured the asset manager with a new primary asset type to scan in the project settings and the getprimaryassetidlist always returns an empty list.
Edit: and also created some data assets with this new primarydataasset type.
It is driving me crazy here, anyone knows whats going wrong?
I know it’s been a year since you posted this question, but since no one answered this, this might be helpful to anyone struggling with this.
The concept behind this Asset Manager system is quite confusing. There is a lot of overlap in the terminology and Data Assets themselves can be quite useful in decoupling of various assets & BP logic during the design phase without the Asset Manager involved (actually this is what the video mostly shows, tbh).
The UPrimaryDataAsset class implements the UObject virtual function called GetPrimaryAssetId() that returns a simple struct consisting of just two data members called Type and Name. These data members are both just FNames, but this ID struct is used to identify so-called ‘Primary Assets’.
Primary Assets are Asset Manager concepts. Basically, by designating some classes as a ‘Primary Asset’ those classes can be referenced by this ID with the Asset Manager and then used in your custom loading logic. This is what Asset Manager is actually made for. You can subclass it and program it.
In the UPrimaryDataAsset's implementation of the GetPrimaryAssetId() function the Type member of that ID struct is set to the name of your class derived from the UPrimaryDataAsset minus the ‘U’ at the beginning.
For example, I subclassed UPrimaryDataAsset this way:
UWeaponPrimaryDataAsset : public UPrimaryDataAsset
The Type in this case is “WeaponPrimaryDataAsset”.
The Name member of the ID struct is set to the name of the Data Asset object created from UWeaponPrimaryDataAsset class in the Content Browser. This Data Asset object will have an icon with a red background - it is an object, not a class. I named my Data Asset object “TheSwordOfAThousandTruths”.
So in your Project Settings > Asset Manager name your Primary Asset Type to the name of the subclass (in my case “WeaponPrimaryDataAsset”), set Asset Base Class accordingly (in my case it is again ‘WeaponPrimaryDataAsset’ - because a class is a type ) and point AssetManager to the folder your Data Asset is in (in my case it’s “/Game/Wapons” ).
But you don’t need to rely on the UPrimaryDataAsset’s implementation of GetPrimaryAssetId(). You can also implement your own GetPrimaryAssetId() function inside the derived class ( in my case this is UWeaponPrimaryDataAsset class ).
I implemented it like this:
FPrimaryAssetId GetPrimaryAssetId() const override
{
return FPrimaryAssetId("Weapon", GetFName());
}
In this case the Type member is “Weapon” - so I changed Primary Asset Type in Asset Manager settings to “Weapon”.
@@kozzArt Thanks! It actually helped me understand better :D
@@FMagno Glad to hear that. I forgot to mention than whenever you change Type value, you need to change PrimaryAssetType dropdown menu parameter of GetPrimaryAssetIDList function in the Blueprints.
Also, instead of using literal as a Type ("Weapon" in my example), you can declare proper (FName I guess) UPROPERTY called "AssetType" in your subclass of UPrimaryDataAsset and pass it to the Type parameter of the FPrimaryAssetId constructor inside GetPrimaryAssetId() function. That way you can set (and change) Type in DataAsset object in the ContentBrowser, which is much more convenient. I think Epic's ActionRPG sample does something like that.