2021-09-28 13:33:17 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
# pragma once
2022-11-24 14:53:52 -05:00
# include "SmartObjectPersistentCollection.h"
2021-09-28 13:33:17 -04:00
# include "SmartObjectCollection.generated.h"
2021-11-26 12:55:06 -05:00
class USmartObjectDefinition ;
2021-09-28 13:33:17 -04:00
class USmartObjectComponent ;
/** Actor holding smart object persistent data */
2022-11-24 14:53:52 -05:00
UCLASS ( Deprecated , NotBlueprintable , hidecategories = ( Rendering , Replication , Collision , Input , HLOD , Actor , LOD , Cooking , WorldPartition ) , notplaceable , meta = ( DeprecationMessage = " SmartObjectCollection class is deprecated. Please use SmartObjectPersistentCollection instead. " ) )
class SMARTOBJECTSMODULE_API ADEPRECATED_SmartObjectCollection : public AActor
2021-09-28 13:33:17 -04:00
{
GENERATED_BODY ( )
protected :
friend class USmartObjectSubsystem ;
2022-11-24 14:53:52 -05:00
explicit ADEPRECATED_SmartObjectCollection ( const FObjectInitializer & ObjectInitializer = FObjectInitializer : : Get ( ) ) ;
2021-09-28 13:33:17 -04:00
2022-10-10 12:00:30 -04:00
virtual void PostLoad ( ) override ;
2021-11-02 11:09:09 -04:00
2022-07-15 10:50:18 -04:00
/** Removes all entries from the collection. */
void ClearCollection ( ) ;
2021-11-02 11:09:09 -04:00
UPROPERTY ( VisibleAnywhere , Category = SmartObject )
FBox Bounds = FBox ( ForceInitToZero ) ;
2021-09-28 13:33:17 -04:00
UPROPERTY ( VisibleAnywhere , Category = SmartObject )
TArray < FSmartObjectCollectionEntry > CollectionEntries ;
2021-11-02 11:09:09 -04:00
UPROPERTY ( )
2022-01-19 14:16:16 -05:00
TMap < FSmartObjectHandle , FSoftObjectPath > RegisteredIdToObjectMap ;
2021-09-28 13:33:17 -04:00
2021-11-02 11:09:09 -04:00
UPROPERTY ( VisibleAnywhere , Category = SmartObject )
2021-11-26 09:52:13 -05:00
TArray < TObjectPtr < const USmartObjectDefinition > > Definitions ;
2021-11-02 11:09:09 -04:00
bool bRegistered = false ;
2021-09-28 13:33:17 -04:00
# if WITH_EDITORONLY_DATA
2022-10-10 12:00:30 -04:00
private :
/** This property used to be exposed to the UI editor. It was replaced with bBuildCollectionAutomatically for greater readability. */
UPROPERTY ( )
bool bBuildOnDemand_DEPRECATED = true ;
protected :
2022-11-07 09:57:31 -05:00
/** if set to true will result in letting the level-less SmartObjects to register. Required for smart object unit testing. */
bool bIgnoreLevelTesting = false ;
2022-11-29 05:02:39 -05:00
UPROPERTY ( VisibleAnywhere , Category = SmartObject , AdvancedDisplay )
2022-10-10 12:00:30 -04:00
bool bBuildCollectionAutomatically = false ;
2021-11-02 11:09:09 -04:00
bool bBuildingForWorldPartition = false ;
2021-09-28 13:33:17 -04:00
# endif // WITH_EDITORONLY_DATA
} ;