Navigation
API > API/Plugins > API/Plugins/CineAssemblyToolsEditor > API/Plugins/CineAssemblyToolsEditor/UCineAssemblyEditorFunctionLibra-
Description
Adds a new Associated Asset descriptor to a Schema's template sequence. When an Assembly is created from this Schema, the CineAssembly factory will create an asset of the specified class at the specified relative path, and include it in the Assembly's asset tree.
EXPERIMENTAL: The CinematicAssemblyTools plugin officially supports UWorld for associated assets through the CineAssemblySchema UI. Associating assets of other class types may work, but some are untested.
Note: Only asset classes are supported. Non-asset classes, such as AActor or UActorComponent, will be rejected at runtime. Note: If AssetClass is UCineAssembly, the call is routed to AddSubAssemblyTemplate and the returned AssetID will be invalid. Consider calling AddSubAssemblyTemplate instead.
| Name | AddAssociatedAsset |
| Type | function |
| Header File | /Engine/Plugins/VirtualProduction/CinematicAssemblyTools/Source/CineAssemblyToolsEditor/Public/CineAssemblyEditorFunctionLibrary.h |
| Include Path | #include "CineAssemblyEditorFunctionLibrary.h" |
| Source | /Engine/Plugins/VirtualProduction/CinematicAssemblyTools/Source/CineAssemblyToolsEditor/Private/CineAssemblyEditorFunctionLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Cine Assembly Tools", Meta=(ScriptMethod))
static FGuid AddAssociatedAsset
(
UCineAssemblySchema * Schema,
TSubclassOf< UObject > AssetClass,
const FString & AssetName,
FName Label,
const FString & RelativePath,
UObject * TemplateAsset
)
The stable AssetID for the new descriptor. The AssetID will be invalid if the operation failed, or if the call was routed to AddSubAssemblyTemplate (see note above).
Parameters
| Name | Remarks |
|---|---|
| Schema | The schema whose template sequence will be modified |
| AssetClass | The class of asset to create alongside each assembly. Only asset classes are supported. Non-asset classes, such as AActor or UActorComponent, will be rejected at runtime. |
| AssetName | Optional template name for the asset. If empty, the factory's default asset name is used. |
| Label | Optional semantic label. If empty, a unique label is auto-assigned from the asset's display name. |
| RelativePath | Optional path, relative to the assembly root, where the asset should be created |
| TemplateAsset | Optional template asset to duplicate when the factory creates this descriptor's asset. Must match AssetClass. If null, a new asset of AssetClass is created instead. |