Open 3D Engine AzCore 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.
AZ::AssetTypeInfo Class Referenceabstract

#include <AssetTypeInfoBus.h>

Inherits AZ::EBusTraits.

Public Types

typedef AZ::Data::AssetType BusIdType
 
typedef AZStd::recursive_mutex MutexType
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType = AZ::Internal::EBusEnvironmentAllocator
 
using BusIdType = NullBusId
 
using BusIdOrderCompare = NullBusIdCompare
 
using BusHandlerOrderCompare = BusHandlerCompareDefault
 
using MutexType = NullMutex
 
using EventQueueMutexType = NullMutex
 
template<class Bus >
using ConnectionPolicy = EBusConnectionPolicy< Bus >
 
template<class Context >
using StoragePolicy = EBusEnvironmentStoragePolicy< Context >
 
template<class Bus >
using RouterPolicy = EBusRouterPolicy< Bus >
 
using EventProcessingPolicy = EBusEventProcessingPolicy
 
template<typename DispatchMutex , bool IsLocklessDispatch>
using DispatchLockGuard = AZStd::conditional_t< IsLocklessDispatch, AZ::Internal::NullLockGuard< DispatchMutex >, AZStd::scoped_lock< DispatchMutex > >
 
template<typename ContextMutex >
using ConnectLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
template<typename ContextMutex >
using BindLockGuard = AZStd::scoped_lock< ContextMutex >
 
template<typename ContextMutex >
using CallstackTrackerLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 

Public Member Functions

virtual AZ::Data::AssetType GetAssetType () const =0
 this is the same type Id (uuid) as your AssetData-derived class's RTTI type.
 
virtual const char * GetAssetTypeDisplayName () const
 Retrieve the friendly name for the asset type.
 
virtual const char * GetGroup () const
 This is the group or category that this kind of asset appears under for filtering and displaying in the browser.
 
virtual const char * GetBrowserIcon () const
 You can implement this to apply a specific icon to all assets of your type instead of using built in heuristics.
 
virtual AZ::Uuid GetComponentTypeId () const
 
virtual void GetAssetTypeExtensions (AZStd::vector< AZStd::string > &extensions)
 Retrieve file extensions for the asset type.
 
virtual bool CanCreateComponent (const AZ::Data::AssetId &assetId) const
 
virtual int GetAssetTypeDragAndDropCreationPriority () const
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 
static constexpr const int s_LowPriority = -10
 
static constexpr const int s_NormalPriority = 0
 use when you want your type to be the last resort
 
static constexpr const int s_HighPriority = 10
 the default priority
 
- Static Public Attributes inherited from AZ::EBusTraits
static constexpr EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static constexpr EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single
 
static constexpr bool EnableEventQueue = false
 
static constexpr bool EventQueueingActiveByDefault = true
 
static constexpr bool EnableQueuedReferences = false
 
static constexpr bool LocklessDispatch = false
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 

Detailed Description

Bus for acquiring information about a given asset type, usually serviced by the relevant asset handler. Extensions, load parameters, custom stream settings, etc.

Member Function Documentation

◆ CanCreateComponent()

virtual bool AZ::AssetTypeInfo::CanCreateComponent ( const AZ::Data::AssetId assetId) const
inlinevirtual

Determines if a component can be created from the asset type This will be called before attempting to create a component from an asset (drag&drop, etc) You can use this to filter by subIds or do your own validation here if needed

◆ GetAssetTypeDragAndDropCreationPriority()

virtual int AZ::AssetTypeInfo::GetAssetTypeDragAndDropCreationPriority ( ) const
inlinevirtual

Used to assign a sort order to assets in the case where the user drags and drops a source file (like a FBX, but others too) which result in many different products of different types. Creating entities for each will cause a jumbled mess, so instead, the products will be sorted using this value as a hint and the first one in the resulting list will be picked to represent the drop operation. Highest number wins. In the case of ties, the list will also be sorted alphabetically and give a higher weight to assets with the same name as the source file that produced them.

◆ GetComponentTypeId()

virtual AZ::Uuid AZ::AssetTypeInfo::GetComponentTypeId ( ) const
inlinevirtual

you can return the kind of component best suited to spawn on an entity if this kind of asset is dragged to the viewport or to the component entity area.


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