ICollectionManager

Unreal Engine C++ API Reference > Developer > CollectionManager

References

   
Module CollectionManager
Header /Engine/Source/Developer/CollectionManager/Public/ICollectionManager.h
Include #include "ICollectionManager.h"

Syntax

class ICollectionManager  

Destructors

Type Name Description
  ~ICollectionManager () Virtual destructor

Functions

Type Name Description
bool AddToCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TConstArrayView< FSoftObjectPath > ..., int32* OutNumAdded )  
bool AddToCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const FSoftObjectPath& ObjectPath ) Adds an asset to the specified collection.
bool CollectionExists ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Returns true if the collection exists
bool CreateCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., ECollectionStorageMode::Type Storag... ) Adds a collection to the asset registry. A .collection file will be added to disk.
void CreateUniqueCollectionName ( const FName& BaseName, ECollectionShareType::Type ShareTyp..., FName& OutCollectionName ) Creates a unique collection name for the given type taking the form BaseName+(unique number)
bool DestroyCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Removes a collection to the asset registry. A .collection file will be deleted from disk.
bool EmptyCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Removes all assets from the specified collection.
bool GetAssetsInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FSoftObjectPath >& OutAsse..., ECollectionRecursionFlags::Flags Re... ) Returns a list of asset paths found in the specified collection and share type
void GetChildCollectionNames ( FName CollectionName, ECollectionShareType::Type ShareTyp..., ECollectionShareType::Type ChildSha..., TArray< FName >& CollectionNames ) Returns the list of child collections of the given collection that are also of the specified share type
void GetChildCollections ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FCollectionNameType >& Out... ) Returns the list of child collections of the given collection
bool GetClassesInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FTopLevelAssetPath >& Clas..., ECollectionRecursionFlags::Flags Re... ) Returns a list of class paths found in the specified collection and share type
bool GetCollectionColor ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TOptional< FLinearColor >& OutColo... ) Gets the optional color for the specified collection
void GetCollectionNames ( ECollectionShareType::Type ShareTyp..., TArray< FName >& CollectionNames ) Returns the list of collection names of the specified share type
void GetCollections ( TArray< FCollectionNameType >& Out... ) Returns the list of collections
void GetCollections ( FName CollectionName, TArray< FCollectionNameType >& Out... ) Returns the list of collections with the given name
void GetCollectionsContainingObject ( const FSoftObjectPath& ObjectPath, TArray< FCollectionNameType >& Out..., ECollectionRecursionFlags::Flags Re... ) Returns a list of collections in which the specified object exists
void GetCollectionsContainingObject ( const FSoftObjectPath& ObjectPath, ECollectionShareType::Type ShareTyp..., TArray< FName >& OutCollectionName..., ECollectionRecursionFlags::Flags Re... ) Returns a list of collections in which the specified object exists of the specified share type
void GetCollectionsContainingObjects ( const TArray< FSoftObjectPath >& O..., TMap< FCollectionNameType, TArray< ..., ECollectionRecursionFlags::Flags Re... ) Returns a list of collections in which any of the specified objects exist
FString GetCollectionsStringForObject ( const FSoftObjectPath& ObjectPath, ECollectionShareType::Type ShareTyp..., ECollectionRecursionFlags::Flags Re..., bool bFullPaths ) Returns a string containing a comma separated list of collections in which the specified object exists of the specified share type
bool GetCollectionStatusInfo ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FCollectionStatusInfo& OutStatusIn... ) Gets the status info for the specified collection
bool GetCollectionStorageMode ( FName CollectionName, ECollectionShareType::Type ShareTyp..., ECollectionStorageMode::Type& OutS... ) Gets the method by which the specified collection stores its objects (static or dynamic)
bool GetDynamicQueryText ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FString& OutQueryText ) Gets the dynamic query text for the specified collection.
FText GetLastError () Returns the most recent error.
bool GetObjectsInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FSoftObjectPath >& ObjectP..., ECollectionRecursionFlags::Flags Re... ) Returns a list of object paths found in the specified collection and share type
TOptional< F... GetParentCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Returns the parent collection of the given collection, or an unset value if there is no parent set
void GetRootCollectionNames ( ECollectionShareType::Type ShareTyp..., TArray< FName >& CollectionNames ) Returns the list of root-level collection names of the specified share type
void GetRootCollections ( TArray< FCollectionNameType >& Out... ) Returns the list of root-level collections
void HandleFixupRedirectors ( ICollectionRedirectorFollower& InR... ) Called to notify the collections that they should fix-up their object references so that they no longer contain any redirectors References are only updated in-memory, and won't be saved to disk until a redirector is deleted (which forces our hand), or the collection is saved for any other reason
void HandleObjectDeleted ( const FSoftObjectPath& ObjectPath ) Called to notify the collections that an object has been deleted
void HandleObjectRenamed ( const FSoftObjectPath& OldObjectPa..., const FSoftObjectPath& NewObjectPa... ) Called to notify the collections that an object has been renamed or moved
bool HandleRedirectorDeleted ( const FSoftObjectPath& ObjectPath ) Called to notify the collections that a redirector has been deleted and that they should ensure their on-disk representation is re-saved with the fixed up in-memory version
bool HasCollectionColors ( TArray< FLinearColor >* OutCol... ) Checks whether any collections have a custom color set, optionally retrieving the list of in-use colors
bool HasCollections () Returns whether or not the collection manager contains any collections
bool IsObjectInCollection ( const FSoftObjectPath& ObjectPath, FName CollectionName, ECollectionShareType::Type ShareTyp..., ECollectionRecursionFlags::Flags Re... ) Check to see if the given object exists in the given collection
bool IsValidCollectionName ( const FString& CollectionName, ECollectionShareType::Type ShareTyp... ) Returns whether or not the given collection name is valid.
bool IsValidParentCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FName ParentCollectionName, ECollectionShareType::Type ParentSh... ) Check to see if the given collection is valid to be used as the parent of another collection.
FAddToCollec... OnAddToCollectionCheckinDescriptionEvent ()  
FOnAssetsAdd... OnAssetsAddedToCollection ()  
FOnAssetsRem... OnAssetsRemovedFromCollection ()  
FCollectionC... OnCollectionCreated ()  
FCollectionD... OnCollectionDestroyed ()  
FCollectionR... OnCollectionRenamed ()  
FCollectionR... OnCollectionReparented ()  
FCollectionU... OnCollectionUpdated ()  
bool RemoveFromCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const FSoftObjectPath& ObjectPath ) Removes the asset from the specified collection.
bool RemoveFromCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TConstArrayView< FSoftObjectPath > ..., int32* OutNumRemoved )  
bool RenameCollection ( FName CurrentCollectionName, ECollectionShareType::Type CurrentS..., FName NewCollectionName, ECollectionShareType::Type NewShare... ) Renames a collection.
bool ReparentCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FName ParentCollectionName, ECollectionShareType::Type ParentSh... ) Re-parents a collection.
bool SaveCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Save the collection (if dirty) and check it into source control (if under SCC control)
bool SetCollectionColor ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const TOptional< FLinearColor >& N... ) Sets the optional color for the specified collection
bool SetDynamicQueryText ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const FString& InQueryText ) Sets the dynamic query text for the specified collection.
bool TestDynamicQuery ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const ITextFilterExpressionContext ..., bool& OutResult ) Tests the dynamic query for the specified collection against the context provided.
bool UpdateCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp... ) Update the collection to make sure it's using the latest version from source control (if under SCC control)

Classes

Type Name Description
Public class FAddToCollectionCheckinDescriptionEvent When a collection checkin happens, use this event to add additional text to the changelist description
Public class FAssetsAddedEvent  
Public class FAssetsRemovedEvent  
Public class FCollectionCreatedEvent Event for when collections are created
Public class FCollectionDestroyedEvent Event for when collections are destroyed
Public class FCollectionRenamedEvent Event for when collections are renamed
Public class FCollectionReparentedEvent Event for when collections are re-parented (params: Collection, OldParent, NewParent)
Public class FCollectionUpdatedEvent Event for when collections is updated, or otherwise changed and we can't tell exactly how (eg, after updating from source control and merging)

Typedefs

Name Description
FOnAssetsAddedToCollection Event for when assets are added to a collection
FOnAssetsRemovedFromCollection Event for when assets are removed from a collection

Deprecated Functions

Type Name Description
bool AddToCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const TArray< FName >& ObjectPaths, int32* OutNumAdded ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool AddToCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FName ObjectPath ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool GetAssetsInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FName >& OutAssetPaths, ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool GetClassesInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FName >& ClassPaths, ECollectionRecursionFlags::Flags Re... ) FNames containing class paths are deprecated. Use FTopLevelAssetPath instead.
void GetCollectionsContainingObject ( FName ObjectPath, TArray< FCollectionNameType >& Out..., ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
void GetCollectionsContainingObject ( FName ObjectPath, ECollectionShareType::Type ShareTyp..., TArray< FName >& OutCollectionName..., ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
void GetCollectionsContainingObjects ( const TArray< FName >& ObjectPaths, TMap< FCollectionNameType, TArray< ..., ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
FString GetCollectionsStringForObject ( FName ObjectPath, ECollectionShareType::Type ShareTyp..., ECollectionRecursionFlags::Flags Re..., bool bFullPaths ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool GetObjectsInCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., TArray< FName >& ObjectPaths, ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
void HandleObjectDeleted ( const FName& ObjectPath ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
void HandleObjectRenamed ( const FName& OldObjectPath, const FName& NewObjectPath ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool HandleRedirectorDeleted ( const FName& ObjectPath ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool IsObjectInCollection ( FName ObjectPath, FName CollectionName, ECollectionShareType::Type ShareTyp..., ECollectionRecursionFlags::Flags Re... ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
FAssetsAdded... OnAssetsAdded () Names containing full asset paths are deprecated, use OnAssetsAddedToCollection instead.
FAssetsRemov... OnAssetsRemoved () Names containing full asset paths are deprecated, use OnAssetsRemovedFromCollection instead.
bool RemoveFromCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., FName ObjectPath ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.
bool RemoveFromCollection ( FName CollectionName, ECollectionShareType::Type ShareTyp..., const TArray< FName >& ObjectPaths, int32* OutNumRemoved ) FNames containing full object paths are deprecated. Use FSoftObjectPath instead.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library