You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Parameters must be registered with the UOL module in much the same way as fragment types. Tidied up globals into a singleton Registry class. Added a function to FUniversalObjectLocator that allows manual addition of fragments. Also removed the defunct IActorLocatorFragmentResolver interface in favor of supplying these parameters externally. Corrected Anim Instance locators being always used when trying to address skeletal mesh components. #rb david.bromberg [CL 29890178 by andrew rodham in ue5-main branch]
38 lines
857 B
C++
38 lines
857 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UniversalObjectLocatorRegistry.h"
|
|
#include "UniversalObjectLocatorFwd.h"
|
|
#include "UniversalObjectLocatorFragmentType.h"
|
|
#include "Algo/Find.h"
|
|
|
|
namespace UE::UniversalObjectLocator
|
|
{
|
|
|
|
FRegistry& FRegistry::Get()
|
|
{
|
|
static FRegistry Registry;
|
|
return Registry;
|
|
}
|
|
|
|
const FFragmentType* FRegistry::FindFragmentType(FName ID) const
|
|
{
|
|
return Algo::FindBy(FragmentTypes, ID, &FFragmentType::FragmentTypeID);
|
|
}
|
|
|
|
void FRegistry::AddReferencedObjects(FReferenceCollector& Collector)
|
|
{
|
|
Collector.AddReferencedObjects(ParameterTypes);
|
|
|
|
for (FFragmentType& FragmentType : FragmentTypes)
|
|
{
|
|
Collector.AddReferencedObject(FragmentType.PayloadType);
|
|
}
|
|
}
|
|
|
|
FString FRegistry::GetReferencerName() const
|
|
{
|
|
return TEXT("UE::UniversalObjectLocator::FRegistry");
|
|
}
|
|
|
|
|
|
} // namespace UE::UniversalObjectLocator
|