2023-01-31 14:46:14 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
# pragma once
# include "Subsystems/WorldSubsystem.h"
# include "GeometryCollectionISMPoolSubSystem.generated.h"
class AGeometryCollectionISMPoolActor ;
/**
2023-06-08 19:39:06 -04:00
* A subsystem managing ISMPool actors .
* Used by geometry collection now but repurposed for more general use .
*/
2023-06-17 18:14:12 -04:00
UCLASS ( MinimalAPI )
class UGeometryCollectionISMPoolSubSystem : public UWorldSubsystem
2023-01-31 14:46:14 -05:00
{
GENERATED_BODY ( )
public :
2023-06-17 18:14:12 -04:00
GEOMETRYCOLLECTIONENGINE_API UGeometryCollectionISMPoolSubSystem ( ) ;
2023-01-31 14:46:14 -05:00
// USubsystem BEGIN
2023-06-17 18:14:12 -04:00
GEOMETRYCOLLECTIONENGINE_API virtual void Initialize ( FSubsystemCollectionBase & Collection ) override ;
GEOMETRYCOLLECTIONENGINE_API virtual void Deinitialize ( ) override ;
2023-01-31 14:46:14 -05:00
// USubsystem END
2023-06-08 19:39:06 -04:00
/** Finds or creates an actor. */
2023-06-17 18:14:12 -04:00
GEOMETRYCOLLECTIONENGINE_API AGeometryCollectionISMPoolActor * FindISMPoolActor ( ) ;
2023-06-08 19:39:06 -04:00
/** Get all actors managed by the subsystem. */
2023-06-17 18:14:12 -04:00
GEOMETRYCOLLECTIONENGINE_API void GetISMPoolActors ( TArray < AGeometryCollectionISMPoolActor * > & OutActors ) const ;
2023-01-31 14:46:14 -05:00
protected :
2023-06-08 19:39:06 -04:00
/** For now we only use one ISMPool actor per world, but we could extend the system to manage many more and return the right one based on search criteria. */
2023-05-03 07:24:56 -04:00
UPROPERTY ( Transient )
2023-01-31 14:46:14 -05:00
TObjectPtr < AGeometryCollectionISMPoolActor > ISMPoolActor ;
} ;