You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
88 lines
2.0 KiB
C++
88 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/LazyObjectPtr.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/WeakObjectPtr.h"
|
|
#include "UObject/WeakObjectPtrTemplates.h"
|
|
|
|
#include "LevelSequenceObject.generated.h"
|
|
|
|
class UObject;
|
|
|
|
|
|
/**
|
|
* Structure for animated Actor objects.
|
|
*/
|
|
USTRUCT()
|
|
struct FLevelSequenceObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
/** Creates and initializes a new instance. */
|
|
FLevelSequenceObject()
|
|
: ObjectOrOwner(nullptr)
|
|
, CachedComponent(nullptr)
|
|
{ }
|
|
|
|
/**
|
|
* Creates and initializes a new instance from an object.
|
|
*
|
|
* @param InObject The object to be bound.
|
|
*/
|
|
FLevelSequenceObject(UObject* InObject)
|
|
: ObjectOrOwner(InObject)
|
|
, CachedComponent(nullptr)
|
|
{ }
|
|
|
|
/**
|
|
* Creates and initializes a new instance from an object component.
|
|
*
|
|
* @param InOwner The object that owns the component.
|
|
* @param InComponentName The component to be bound.
|
|
*/
|
|
FLevelSequenceObject(UObject* InOwner, FString InComponentName)
|
|
: ObjectOrOwner(InOwner)
|
|
, ComponentName(InComponentName)
|
|
, CachedComponent(nullptr)
|
|
{ }
|
|
|
|
/**
|
|
* Compares two bindings for equality.
|
|
*
|
|
* @param X The first binding to compare.
|
|
* @param Y The second binding to compare.
|
|
* @return true if the bindings refer to the same object, false otherwise.
|
|
*/
|
|
friend bool operator==(const FLevelSequenceObject& X, const FLevelSequenceObject& Y)
|
|
{
|
|
return (X.ObjectOrOwner == Y.ObjectOrOwner) && (X.ComponentName == Y.ComponentName);
|
|
}
|
|
|
|
/**
|
|
* Gets a pointer to the possessed object.
|
|
*
|
|
* @return The object (usually an Actor or an ActorComponent).
|
|
*/
|
|
LEVELSEQUENCE_API UObject* GetObject() const;
|
|
|
|
private:
|
|
|
|
/** The object or the owner of the object being possessed. */
|
|
UPROPERTY()
|
|
TLazyObjectPtr<UObject> ObjectOrOwner;
|
|
|
|
/** Optional name of an ActorComponent. */
|
|
UPROPERTY()
|
|
FString ComponentName;
|
|
|
|
/** Cached pointer to the Actor component (only if ComponentName is set). */
|
|
UPROPERTY(transient)
|
|
mutable TWeakObjectPtr<UObject> CachedComponent;
|
|
};
|