Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::AssetSeedManager Class Reference

Public Types

using AssetsInfoList = AZStd::vector< AZ::Data::AssetInfo >
 

Public Member Functions

 AZ_TYPE_INFO (AssetSeedManager, "{0DD7913A-EAD2-43DF-9A30-8A6FA6111E98}")
 
 AZ_CLASS_ALLOCATOR (AssetSeedManager, AZ::SystemAllocator)
 
bool AddSeedAsset (AZ::Data::AssetId assetId, AzFramework::PlatformFlags platformFlags, AZStd::string path=AZStd::string(), const AZStd::string &seedListFilePath=AZStd::string())
 
bool AddSeedAsset (const AZStd::string &assetPath, AzFramework::PlatformFlags platformFlags, const AZStd::string &seedListFilePath=AZStd::string())
 
AZStd::pair< AZ::Data::AssetId, AzFramework::PlatformFlags > AddSeedAssetForValidPlatforms (const AZStd::string &assetPath, AzFramework::PlatformFlags platformFlags)
 
void RemoveSeedAsset (AZ::Data::AssetId assetId, AzFramework::PlatformFlags platformFlags)
 
void RemoveSeedAsset (const AZStd::string &assetKey, AzFramework::PlatformFlags platformFlags)
 
void AddPlatformToAllSeeds (AzFramework::PlatformId platform)
 
void RemovePlatformFromAllSeeds (AzFramework::PlatformId platform)
 
bool Save (const AZStd::string &destinationFilePath)
 Save the asset seed list to the destination path.
 
void UpdateSeedPath ()
 
void RemoveSeedPath ()
 Removes seed path hint for all existing seeds.
 
bool Load (const AZStd::string &sourceFilePath)
 
const AzFramework::AssetSeedList & GetAssetSeedList () const
 
AZ::Outcome< void, AZStd::string > SetSeedPlatformFlags (int index, AzFramework::PlatformFlags platformFlags)
 
AssetsInfoList GetDependenciesInfo (AzFramework::PlatformId platformIndex, const AZStd::unordered_set< AZ::Data::AssetId > &exclusionList, AssetFileDebugInfoList *optionalDebugList=nullptr, const AZStd::vector< AZStd::string > &wildcardPatternExclusionList=AZStd::vector< AZStd::string >()) const
 
AssetFileInfoList GetDependencyList (AzFramework::PlatformId platformIndex, const AZStd::unordered_set< AZ::Data::AssetId > &exclusionList={}, AssetFileDebugInfoList *optionalDebugList=nullptr, const AZStd::vector< AZStd::string > &wildcardPatternExclusionList=AZStd::vector< AZStd::string >()) const
 
bool SaveAssetFileInfo (const AZStd::string &destinationFilePath, AzFramework::PlatformFlags platformFlags, const AZStd::unordered_set< AZ::Data::AssetId > &exclusionList={}, const AZStd::string &debugFilePath=AZStd::string(), const AZStd::vector< AZStd::string > &wildcardPatternExclusionList=AZStd::vector< AZStd::string >())
 
AZ::Outcome< AssetFileInfoList, AZStd::string > LoadAssetFileInfo (const AZStd::string &assetListFileAbsolutePath)
 
const AZStd::string & GetReadablePlatformList (const AzFramework::SeedInfo &seed)
 
AZ::Data::AssetId FindAssetIdByPathHint (const AZStd::string &pathHint) const
 
AZ::Data::AssetId GetAssetIdByPath (const AZStd::string &assetPath, const AzFramework::PlatformFlags &platformFlags) const
 
AZ::Data::AssetId GetAssetIdByAssetKey (const AZStd::string &assetKey, const AzFramework::PlatformFlags &platformFlags) const
 

Static Public Member Functions

static const char * GetSeedFileExtension ()
 Returns the Seed List file extension.
 
static AZ::Outcome< void, AZStd::string > ValidateSeedFileExtension (const AZStd::string &path)
 
static const char * GetAssetListFileExtension ()
 Returns the Asset List file extension.
 
static void Reflect (AZ::ReflectContext *context)
 
static AZ::Data::AssetInfo GetAssetInfoById (const AZ::Data::AssetId &assetId, const AzFramework::PlatformId &platformIndex, const AZStd::string &seedListfilePath=AZStd::string(), const AZStd::string &asetHintPath=AZStd::string())
 

Member Function Documentation

◆ AddSeedAssetForValidPlatforms()

AZStd::pair< AZ::Data::AssetId, AzFramework::PlatformFlags > AzToolsFramework::AssetSeedManager::AddSeedAssetForValidPlatforms ( const AZStd::string &  assetPath,
AzFramework::PlatformFlags  platformFlags 
)

Attempts to add all platform-specific instances of the given Asset to the Seed List, if they exist. Returns the Asset Id of the added Asset, and all of the Platforms that were found on-disk and added to the Seed List.

◆ Load()

bool AzToolsFramework::AssetSeedManager::Load ( const AZStd::string &  sourceFilePath)

Loads the asset seed file from the source path and adds root assets from the file to the seed list

◆ RemoveSeedAsset()

void AzToolsFramework::AssetSeedManager::RemoveSeedAsset ( const AZStd::string &  assetKey,
AzFramework::PlatformFlags  platformFlags 
)

Removes the seed from the seed list. AssetKey can either be an assetid, assetpath or the path hint. If you are providing an assetId than the format has to be "Uuid:SubID", i.e source Uuid and sub ID are separated by a colon and subId needs to be in the decimal format. Also important to note is that the asset path is relative to the second project name in the cache for example if your asset absolute path is <absolute_path_to_cachefolder>/<game_name>/<platform>/<game_name_lowercase>/foo/dummy.txt than the assetPath should be foo/dummy.txt

◆ UpdateSeedPath()

void AzToolsFramework::AssetSeedManager::UpdateSeedPath ( )

Updates the seed path for all seeds. If a seed is enabled for multiple platforms, it will update the path with the information provided by the first asset catalog in which that seed exists.

◆ ValidateSeedFileExtension()

static AZ::Outcome< void, AZStd::string > AzToolsFramework::AssetSeedManager::ValidateSeedFileExtension ( const AZStd::string &  path)
static

Validates that the input path has the proper file extension for a Seed List file. Input path can be relative or absolute. Returns void on success, error message on failure.


The documentation for this class was generated from the following file: