UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ARLifeCycleComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "ARTypes.h"
8#include "ARComponent.h"
9#include "ARActor.h"
10#include "ARLifeCycleComponent.generated.h"
11
12#define UE_API AUGMENTEDREALITY_API
13
14class USceneComponent;
15
16UCLASS(MinimalAPI, BlueprintType, Experimental, meta = (BlueprintSpawnableComponent), ClassGroup = "AR Gameplay")
17class UARLifeCycleComponent : public USceneComponent
18{
20
21 UE_API virtual void OnComponentCreated() override;
22 UE_API virtual void DestroyComponent(bool bPromoteChildren = false) override;
23
24public:
27
30
33
36 UPROPERTY(BlueprintAssignable, meta = (DisplayName = "OnARActorSpawned"))
37 FInstanceARActorSpawnedDelegate OnARActorSpawnedDelegate;
38
41 UPROPERTY(BlueprintAssignable, meta = (DisplayName = "OnARActorToBeDestroyed"))
42 FInstanceARActorToBeDestroyedDelegate OnARActorToBeDestroyedDelegate;
43
45 UE_API virtual void OnUnregister() override;
46
48 UE_API void CallInstanceRequestSpawnARActorDelegate(UClass* Class, FGuid NativeID);
49 UE_API void CallInstanceRequestDestroyARActorDelegate(AARActor* Actor);
50
51 UFUNCTION(Reliable, Server, WithValidation)
52 UE_API void ServerSpawnARActor(UClass* ComponentClass, FGuid NativeID);
53
54 UFUNCTION(Reliable, Server, WithValidation)
55 UE_API void ServerDestroyARActor(AARActor* Actor);
56
57 FDelegateHandle SpawnDelegateHandle;
58 FDelegateHandle DestroyDelegateHandle;
59};
60
61#undef UE_API
#define UE_API
Definition ARLifeCycleComponent.h:12
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type, Param1Name)
Definition DelegateCombinations.h:53
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition ARActor.h:16
Definition IDelegateInstance.h:14
Definition ARComponent.h:234
Definition ARLifeCycleComponent.h:18
static UE_API FRequestDestroyARActorDelegate RequestDestroyARActorDelegate
Definition ARLifeCycleComponent.h:32
DECLARE_MULTICAST_DELEGATE_OneParam(FRequestDestroyARActorDelegate, AARActor *)
DECLARE_MULTICAST_DELEGATE_TwoParams(FRequestSpawnARActorDelegate, UClass *, FGuid)
static UE_API FOnSpawnARActorDelegate OnSpawnARActorDelegate
Definition ARLifeCycleComponent.h:29
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnSpawnARActorDelegate, AARActor *, UARComponent *, FGuid)
static UE_API FRequestSpawnARActorDelegate RequestSpawnARActorDelegate
Definition ARLifeCycleComponent.h:26
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FInstanceARActorSpawnedDelegate, UClass *, ComponentClass, FGuid, NativeID, AARActor *, SpawnedActor)
Definition Class.h:3793
Definition RobinHoodHashTable.h:18
Definition Guid.h:109