You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Level Sequences now use UOLs for their bindings. Level Sequence player context is now an ALevelSequenceActor if possible. All bindings (including the extreme-legacy lazy object ptr bindings) are now upgraded to use the UOL binding mechanism. Introduced a new concept for reasoning about object hierarchies in Sequencer: object schemas. Schemas allow customization of how Sequencer handles finding 'parent' and 'child' objects, which allows us to genericize lots of the hard-coded Actor-Component logic. This is just a first pass - there are still many places that directly deal with AActor and UActorComponent, which will be gradually migrated with upcoming work. #jira UE-199305 #rb david.bromberg, ludovic.chabant [CL 29932924 by andrew rodham in ue5-main branch]
63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "LegacyLazyObjectPtrFragment.h"
|
|
#include "UniversalObjectLocatorInitializeParams.h"
|
|
#include "UniversalObjectLocatorInitializeResult.h"
|
|
#include "UniversalObjectLocatorFragmentTypeHandle.h"
|
|
#include "UniversalObjectLocatorResolveParams.h"
|
|
#include "UniversalObjectLocatorStringParams.h"
|
|
#include "UObject/Package.h"
|
|
|
|
UE::UniversalObjectLocator::TFragmentTypeHandle<FLegacyLazyObjectPtrFragment> FLegacyLazyObjectPtrFragment::FragmentType;
|
|
|
|
UE::UniversalObjectLocator::FResolveResult FLegacyLazyObjectPtrFragment::Resolve(const UE::UniversalObjectLocator::FResolveParams& Params) const
|
|
{
|
|
using namespace UE::UniversalObjectLocator;
|
|
|
|
if (LazyObjectId.IsValid() && Params.Context != nullptr)
|
|
{
|
|
int32 PIEInstanceID = Params.Context->GetOutermost()->GetPIEInstanceID();
|
|
FUniqueObjectGuid FixedUpId = PIEInstanceID == -1 ? FUniqueObjectGuid(LazyObjectId) : FUniqueObjectGuid(LazyObjectId).FixupForPIE(PIEInstanceID);
|
|
|
|
if (PIEInstanceID != -1 && FixedUpId == LazyObjectId)
|
|
{
|
|
return FResolveResult();
|
|
}
|
|
|
|
FLazyObjectPtr LazyPtr;
|
|
LazyPtr = FixedUpId;
|
|
|
|
return FResolveResultData(LazyPtr.Get());
|
|
}
|
|
|
|
|
|
return FResolveResult();
|
|
}
|
|
|
|
UE::UniversalObjectLocator::FInitializeResult FLegacyLazyObjectPtrFragment::Initialize(const UE::UniversalObjectLocator::FInitializeParams& InParams)
|
|
{
|
|
using namespace UE::UniversalObjectLocator;
|
|
|
|
// This should never be called
|
|
checkNoEntry();
|
|
return FInitializeResult::Failure();
|
|
}
|
|
|
|
void FLegacyLazyObjectPtrFragment::ToString(FStringBuilderBase& OutStringBuilder) const
|
|
{
|
|
// Not implemented
|
|
}
|
|
|
|
UE::UniversalObjectLocator::FParseStringResult FLegacyLazyObjectPtrFragment::TryParseString(FStringView InString, const UE::UniversalObjectLocator::FParseStringParams& Params)
|
|
{
|
|
// Not implemented
|
|
return UE::UniversalObjectLocator::FParseStringResult().Failure(FText());
|
|
}
|
|
|
|
uint32 FLegacyLazyObjectPtrFragment::ComputePriority(const UObject* ObjectToReference, const UObject* Context)
|
|
{
|
|
// We can't use this at all unless explicitly added by code
|
|
return 0;
|
|
}
|
|
|