You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UETOOL-4055 #rb none #preflight 61f17bd8be0f0e0a6234afb2 #ROBOMERGE-AUTHOR: anousack.kitisa #ROBOMERGE-SOURCE: CL 18737179 in //UE5/Release-5.0/... via CL 18737385 via CL 18738249 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18738699 by anousack kitisa in ue5-main branch]
37 lines
951 B
C++
37 lines
951 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "GeometryCacheAssetBroker.h"
|
|
#include "GeometryCache.h"
|
|
#include "GeometryCacheComponent.h"
|
|
|
|
UClass* FGeometryCacheAssetBroker::GetSupportedAssetClass()
|
|
{
|
|
return UGeometryCache::StaticClass();
|
|
}
|
|
|
|
bool FGeometryCacheAssetBroker::AssignAssetToComponent(UActorComponent* InComponent, UObject* InAsset)
|
|
{
|
|
if (UGeometryCacheComponent* GeometryCacheComponent = Cast<UGeometryCacheComponent>(InComponent))
|
|
{
|
|
UGeometryCache* GeomCache = Cast<UGeometryCache>(InAsset);
|
|
|
|
if ((GeomCache != nullptr) || (InAsset == nullptr))
|
|
{
|
|
GeometryCacheComponent->SetGeometryCache(GeomCache);
|
|
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
UObject* FGeometryCacheAssetBroker::GetAssetFromComponent(UActorComponent* InComponent)
|
|
{
|
|
if (UGeometryCacheComponent* GeometryCacheComponent = Cast<UGeometryCacheComponent>(InComponent))
|
|
{
|
|
return GeometryCacheComponent->GetGeometryCache();
|
|
}
|
|
return nullptr;
|
|
}
|