No description
  • C++ 85.3%
  • C# 14.7%
Find a file
2023-02-01 06:28:59 -05:00
Resources * Documentation: Clean up documentation. 2022-12-09 19:48:16 -05:00
Source/AssetMetaData * Initial commit. 2022-12-09 19:37:26 -05:00
.gitignore * Feature: Add a .gitignore file. 2023-02-01 06:28:59 -05:00
AssetMetaData.uplugin * Initial commit. 2022-12-09 19:37:26 -05:00
README.md * Documentation: Update the README.md to not include the the original location. 2022-12-09 19:52:53 -05:00

Asset Meta Data Documentation

The Meta Data system is an extensible subsystem for Unreal Engine that allows for meta data classes by defined for the purposes of providing a lightweight, queryable database of entities stored in the game install. Generally this would be used for things such as map & weapon listings but can be extended with any amount of meta data as needed.

Using distinct meta data classes avoids the necessity of otherwise having to fully load blueprint classes into memory (and thus loading their referenced assets into memory as well) in order to perform queries. These meta data classes may also be used to store game specific data such as rules about what armors can wield what weapons.

Setup

Setup Search Directories

In your project settings under Game / Meta Data, you will find a "Search Directories" setting. This must be set to all directories that may contain meta data classes in your project. A recommended setup would be "/Game/DynamicContent".

Further, Unreal Engine must be made aware of the content to be cooked regardless of if there is anything directly referencing it or not for this system to work properly. To do this you should set the "Additional Asset Directories to Cook" setting in project settings under Project / Packaging (advanced settings) to contain the same set of directories.

Setting up Content

You must then populate the dynamic content folders you configured with meta data blueprint classes. They must derive from UAssetMetaDataObject or UMapMetaDataObject, depending on if you're referencing regular asset data or a map. You may then populate the class fields with any data as needed for your project - which includes a Soft Class Reference in the case of UAssetMetaDataObject. The Soft Class Reference is necessary to ensure that when querying for meta data we only perform loads on meta data and not load up the referenced object in its entirety when it may not be needed.

Usage

Get Meta Data of Type

This node asks the meta data subsystem to recurse all known search directories and return assets of the specified type - meaning they derive from this meta data type or are this meta data type.

This search will only trigger loads of meta data classes that are of the specified types.

Get All Meta Data

This node asks the meta data subsystem to recurse all known search directories and return all assets found. Currently it does not return parent asset types.

Class Listing

UAssetMetaDataObject

Header: AssetMetaDataObject.h

Status: Finished

The ultimate root class of meta data classes. Specific types of meta data should derive from this class as its parent, either in blueprint or in C++. It provides a general purpose query interface while specialized types of meta data may implement their own query logic.

UMapMetaDataObject

Header: MapMetaDataObject.h

Status: Finished

A specialized root for meta data pertaining to maps stored in the game. You should derive your meta data blueprints from this class if you are intending on building a level listing.