Files
UnrealEngineUWP/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectComponent.h
Yoan StAmant 0733debda8 [SmartObjects] merged USmartObjectDefinition with FSmartObjectConfig and replaced references to config
#preflight 61a118b7664cbb92c762f37b

[CL 18301080 by Yoan StAmant in ue5-main branch]
2021-11-26 12:55:06 -05:00

37 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/SceneComponent.h"
#include "SmartObjectTypes.h"
#include "SmartObjectDefinition.h"
#include "SmartObjectComponent.generated.h"
UCLASS(Blueprintable, ClassGroup = Gameplay, meta = (BlueprintSpawnableComponent), config = Game, HideCategories = (Activation, AssetUserData, Collision, Cooking, HLOD, Lighting, LOD, Mobile, Mobility, Navigation, Physics, RayTracing, Rendering, Tags, TextureStreaming))
class SMARTOBJECTSMODULE_API USmartObjectComponent : public USceneComponent
{
GENERATED_BODY()
public:
explicit USmartObjectComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
FBox GetSmartObjectBounds() const;
const USmartObjectDefinition* GetDefinition() const { return DefinitionAsset; }
void SetDefinition(USmartObjectDefinition* Definition) { DefinitionAsset = Definition; }
FSmartObjectID GetRegisteredID() const { return RegisteredID; }
void SetRegisteredID(const FSmartObjectID Value) { RegisteredID = Value; }
protected:
virtual void OnRegister() override;
virtual void OnUnregister() override;
UPROPERTY(EditAnywhere, Category = SmartObject, BlueprintReadWrite)
TObjectPtr<USmartObjectDefinition> DefinitionAsset;
/** RegisteredID != FSmartObject::InvalidID when registered into a collection by SmartObjectSubsystem */
UPROPERTY(Transient, VisibleAnywhere, Category = SmartObject)
FSmartObjectID RegisteredID;
};