Navigation
API > API/Plugins > API/Plugins/ChaosCaching
| Name | AChaosCacheManager |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ChaosCaching/Source/ChaosCaching/Public/Chaos/CacheManagerActor.h |
| Include Path | #include "Chaos/CacheManagerActor.h" |
Syntax
UCLASS (Experimental, MinimalAPI)
class AChaosCacheManager : public AActor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AChaosCacheManager
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AChaosCacheManager
(
const FObjectInitializer& ObjectInitializer |
Chaos/CacheManagerActor.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FTickObservedFunction | TUniqueFunction< void(UChaosCache *, FObservedComponent &, Chaos::FComponentCacheAdapter *)> | Chaos/CacheManagerActor.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCreateNewCacheCollectionAssetOnRecord | bool | When on, each time the cache starts recording a new asset will be created as an increment of the previous one | Chaos/CacheManagerActor.h |
|
| bStartOnBeginPlay | bool | If true, cache will start automatically on begin play ( playing or recording ) if false, the function Start must be used to tsrat the cache again ( and can be stopped again using Stop ) | Chaos/CacheManagerActor.h |
|
| CacheCollection | TObjectPtr< UChaosCacheCollection > | The Cache Collection asset to use for this observer. | Chaos/CacheManagerActor.h |
|
| CacheMode | ECacheMode | How to use the cache - playback or record | Chaos/CacheManagerActor.h |
|
| StartMode | EStartMode | How to trigger the cache record or playback, timed will start counting at BeginPlay, Triggered will begin counting from when the owning cache manager is requested to trigger the cache action | Chaos/CacheManagerActor.h |
|
| StartTime | float | Defines the (random access) time that represents the rest pose of the components managed by this cache. | Chaos/CacheManagerActor.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveAdapters | TArray< Chaos::FComponentCacheAdapter * > | 1-1 list of adapters for the observed components, populated on BeginEvaluate | Chaos/CacheManagerActor.h | |
| bRestartSimulation | bool | Chaos/CacheManagerActor.h | ||
| EditorIconComponent | TObjectPtr< UBillboardComponent > | Chaos/CacheManagerActor.h |
|
|
| ObservedComponents | TArray< FObservedComponent > | List of observed objects and their caches | Chaos/CacheManagerActor.h |
|
| OpenPlaybackCaches | TArray< TTuple< FCacheUserToken, UChaosCache * > > | Chaos/CacheManagerActor.h | ||
| OpenRecordCaches | TArray< TTuple< FCacheUserToken, UChaosCache * > > | Lists of currently open caches that need to be closed when complete | Chaos/CacheManagerActor.h | |
| PerSolverData | TMap< Chaos::FPhysicsSolverEvents *, FPerSolverData > | List of particles returned by the adapter as requiring a kinematic update | Chaos/CacheManagerActor.h | |
| RestartTimeEnd | float | Chaos/CacheManagerActor.h | ||
| RestartTimeStart | float | Chaos/CacheManagerActor.h | ||
| StartTimeAtBeginPlay | float | Since the object persists | Chaos/CacheManagerActor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginEvaluate() |
Initialize the cache adapters before playing/recording the cache. | Chaos/CacheManagerActor.h | |
bool CanRecord() |
Returns true if this cache manager is allowed to record caches. | Chaos/CacheManagerActor.h | |
void ClearObservedComponents
(
bool bDestroyComponents |
Clear all the observed components | Chaos/CacheManagerActor.h |
|
bool ContainsProperty
(
const UStruct* Struct, |
Chaos/CacheManagerActor.h | ||
void EndEvaluate() |
Clean the cache adapters after playing/recording the cache. | Chaos/CacheManagerActor.h | |
void FindOrAddObservedComponent
(
UPrimitiveComponent* InComponent, |
Find or add a primitive component to a cache manager | Chaos/CacheManagerActor.h |
|
const TArray< FObservedComponent > & GetObservedComponents () |
Accessor to the manager observed components (read only) | Chaos/CacheManagerActor.h | |
| Accessor to the manager observed components (read/write) | Chaos/CacheManagerActor.h | ||
bool IsRecording() |
Chaos/CacheManagerActor.h |
|
|
void ReadRestartData() |
Sets state for all observed components at the restart time. | Chaos/CacheManagerActor.h | |
void RemoveObservedComponent
(
UPrimitiveComponent* InComponent |
Remove a primitive component from the cache manager | Chaos/CacheManagerActor.h |
|
void ResetAllComponentTransforms() |
Resets all components back to the world space transform they had when the cache for them was originally recorded if one is available | Chaos/CacheManagerActor.h |
|
void ResetSingleTransform
(
int32 InIndex |
Resets the component at the specified index in the observed list back to the world space transform it had when the cache for it was originally recorded if one is available | Chaos/CacheManagerActor.h |
|
void SelectComponent
(
int32 InIndex |
Set the component at the specified index in the observed array to be the selected component in the outliner. | Chaos/CacheManagerActor.h | |
void SetCacheMode
(
ECacheMode NewCacheMode |
End UObject interface | Chaos/CacheManagerActor.h | |
void SetCurrentTime
(
float CurrentTime |
Used to set the start time of the cache from a blueprint Note this will be ignored for evaluating in Play mode ( for that case, make sure to use Start(time) instead as this will properly stop the physics thread evalution and restert it after setting the time ) | Chaos/CacheManagerActor.h |
|
void SetEditorIconVisibility
(
bool bVisibility |
Chaos/CacheManagerActor.h | ||
void SetIsSimulating
(
bool InbIsSimulating |
Chaos/CacheManagerActor.h | ||
void SetObservedComponentProperties
(
const ECacheMode& NewCacheMode |
Chaos/CacheManagerActor.h | ||
void SetRestartSimulation
(
bool InbRestartSimulation |
Chaos/CacheManagerActor.h | ||
void SetRestartTimeRange
(
float InRestartTimeStart, |
Chaos/CacheManagerActor.h | ||
void SetStartTime
(
float InStartTime |
Expose StartTime property to Sequencer. | Chaos/CacheManagerActor.h |
|
void Start
(
float InStartTime |
Start the cache evaluation at a specific time If the cache if already eveluating, stop it, set the time, then re-start only works when the cache is in Static Pose or Play mode | Chaos/CacheManagerActor.h |
|
void Stop() |
Stop the cache from eveluating | Chaos/CacheManagerActor.h |
|
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void TickActor
(
float DeltaTime, |
AActor interface | Chaos/CacheManagerActor.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Chaos/CacheManagerActor.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Chaos/CacheManagerActor.h | ||
virtual void PreEditChange
(
FProperty* PropertyAboutToChange |
Chaos/CacheManagerActor.h | ||
virtual void Serialize
(
FArchive& Ar |
End AActor interface UObject interface | Chaos/CacheManagerActor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FObservedComponent & AddNewObservedComponent
(
UPrimitiveComponent* InComponent |
Chaos/CacheManagerActor.h | ||
void EnablePlayback
(
int32 Index, |
Enable playback for a specific component using its index in the list of observed component | Chaos/CacheManagerActor.h |
|
void EnablePlaybackByCache
(
FName InCacheName, |
Enable playback for a specific component using its cache name | Chaos/CacheManagerActor.h |
|
FObservedComponent * FindObservedComponent
(
UPrimitiveComponent* InComponent |
Chaos/CacheManagerActor.h | ||
void HandlePostSolve
(
Chaos::FReal InDt, |
Handles physics thread post-solve (record data for components under record) | Chaos/CacheManagerActor.h | |
void HandlePreBuffer
(
Chaos::FReal InDt, |
Handles physics thread pre-buffer (mark dirty kinematic particles) | Chaos/CacheManagerActor.h | |
void HandlePreSolve
(
Chaos::FReal InDt, |
End AActor interface Handles physics thread pre-solve (push kinematic data for components under playback) | Chaos/CacheManagerActor.h | |
void HandleTeardown
(
Chaos::FPhysicsSolverEvents* InSolver |
Handles solver teardown due to solver destruction / stream-out | Chaos/CacheManagerActor.h | |
void OnStartFrameChanged
(
Chaos::FReal InT |
Evaluates and sets state for all observed components at the specified time. | Chaos/CacheManagerActor.h | |
void SetCacheCollection
(
UChaosCacheCollection* InCacheCollection |
Change the cache collection for this player if the cache is playing or recording this will have no effect | Chaos/CacheManagerActor.h |
|
void TriggerAll() |
Triggers the recording or playback of all observed components | Chaos/CacheManagerActor.h |
|
void TriggerComponent
(
UPrimitiveComponent* InComponent |
Triggers a component to play or record. | Chaos/CacheManagerActor.h |
|
void TriggerComponentByCache
(
FName InCacheName |
Triggers a component to play or record. | Chaos/CacheManagerActor.h |
|
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
AActor interface | Chaos/CacheManagerActor.h | |
virtual void Destroyed() |
Chaos/CacheManagerActor.h | ||
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Chaos/CacheManagerActor.h |