Hi,I’m new to UE4 and I have some experience on Unity development. So far, I have spend few weeks on reading official documents, and follow the tutorials.But after I read the Asset Management Section and do some experiments in Unreal Editor, I am really confused about this asset management thing.
Here’s the questions:
- Does the Asset management affect the content cooking? After Read the document, I asume that when packing my project, Only Primary Asset and Secondary Asset related will be cooked. But After some test, all content still be cooked no matter it is used or no used in my project. So must I do something to active this feature?
- In Unity, I have implement a system which can pack some assets(with it’s references) I need into disk, and in runtime asynchronous load them and their references resource automatic. Now I want something same with this in Unreal Engine. So Asset management is the system I’m looking for? If it is, what I should do to implement the same resource management(pack and load). If it is not, can give me some cue to achieve my purpose.
btw, I’m using UE4.20.3 build from source code.
Thank for any help!!!
Yes, you are looking for asset manager and the asset registry.
In the project setting you need to give the asset manager directories to scan for your primary assets, here is where you also provide cooking rules for those assets. In order for all this to work you will need to create your own class of primary asset data and override the function get primary asset id.
You can asynchronous load and unload assets anytime you need by calling those same named functions in your blueprints or code.
Also if your looking for more customization you can create your own asset manager class and assign it in your project settings.
There is not a whole lot of imformation in the docs so if you read all of it on asset management and registery then the next best place to see how things are done is in epic sample projects like ARPG and shooter game, which both utilize these systems.
Thank you for reply, According to your advice, After did some setting in AssetManager section, which made AssetManager can find PrimaryAsset, The editor finally stop cook every things in content brower! That help me!
Awesome, you are welcome. Im glad I could help. Could you please mark my answer as correct so that others with a simular problem can easily find the solution? Thank you