What are Packages and their relationship to Assets

So I’m working on building code that will make DataTable from CSV automatically.
I got some to code to work that creates a blueprint but it has to create a package first.

Working with code I have a very high-level fundamental question.
What is a Package and what is its relationship to Assets?

Packages are just containers for assets. In code, package is the Outer of an asset.

In UE4/5 most packages types contain only one asset, which has the same name as the package. For example a Texture2D uasset package contains just one Texture2D object with the same name.
package path : /Game/Textures/T_Foo.uasset
asset name : T_Foo
fully qualified asset path : /Game/Textures/T_Foo.T_Foo

One exception is blueprint packages, where the “main” asset is the Blueprint itself (the thing you edit in editor), but its package also contains the generated class and CDO with slightly different names.

In case of datatables I think they are single-asset packages, so it should be pretty easy to handle. Create a package with CreatePackage, and use that as the Outer of the new asset you create. Then call SavePackage and it should do.

See this for more extensive info

Thank you.
This very much helps to clear things up.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.