template<typename AssetDataT>
class AZ::RPI::AssetCreator< AssetDataT >
Common base class for asset creators, which are used to create and initialize instances of an immutable asset class.
(Note this generally follows the builder design pattern, but is called a "creator" rather than a "builder" to avoid confusion with the AssetBuilderSDK).
template<typename AssetDataT >
template<typename ... Args>
Errors should be reported for any condition that prevents creating a valid asset that can be used at runtime. The output asset data would be corrupt to the point that the runtime would report further errors or even crash. Once an error has been reported, subsequent calls to ValidateIsReady() will return false. (Normally this will be called by subclasses, but it is public so client code may also report errors in the same way; for example, when client code is unable to prepare inputs for the AssetCreator).
template<typename AssetDataT >
template<typename ... Args>
Warnings should be reported for any condition that indicates a rendered asset may not appear as the user expects. However, the runtime will not crash or report errors if the output asset is used. (Normally this will be called by subclasses, but it is public so client code may also report warnings in the same way; for example, when client code is unable to prepare inputs for the AssetCreator).
template<typename AssetDataT >
Reports common errors, and returns false if processing should not continue due to prior errors.
Subclasses should call this function before attempting any manipulation of the m_asset, and return immediately if it returns false. This alleviates subclasses from having to track custom state; they just need to call ReportError() for any breaking issue.
- Returns
- false if any errors have been previously reported. Note, it does not return false due to previously reported warnings, because warnings should not invalidate subsequent manipulations of the m_asset.