Loading Assets
Loading assets from the Content browser
A common operation is to load an asset from the Content Browser. Unreal provides a few different options here:
# Python-only convenience method:
asset_path = "/Game/some/asset/path"
asset = unreal.load_asset(asset_path)# Function Library method:
asset_path = "/Game/some/asset/path"
asset = unreal.EditorAssetLibrary.load_asset(asset_path)# Subsystem method:
asset_path = "/Game/some/asset/path"
EditorAssetSubsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
asset = EditorAssetSubsystem.load_asset(asset_path)While it doesn't really matter which option is used, unreal.load_asset() is a rare instance of a Python convenience function provided by Epic
Last updated