DinoFracture 2.11.1
A Dynamic Fracture Library
Loading...
Searching...
No Matches

DinoFracture.FractureEngine Class Referencesealed

This component is created on demand to manage the fracture coroutines. It is not intended to be added by the user. More...

Inheritance diagram for DinoFracture.FractureEngine:
[legend]
Collaboration diagram for DinoFracture.FractureEngine:
[legend]

Static Public Member Functions

static AsyncFractureResult StartFracture (FractureDetails details, FractureGeometry callback, Transform piecesParent, bool transferMass, bool hideAfterFracture)
 Starts a fracture operation.
 
- Static Public Member Functions inherited from DinoFracture.FractureEngineBase
static void ClearCachedFractureData ()
 During both slicing and shattering, temporary data is created and cached to greatly improve future fracture performance.
 
static CoroutineHandle QueueCoroutine (IEnumerator enumerator)
 Adds a coroutine that will start processing on the next update.
 
static bool CancelCoroutine (CoroutineHandle handle)
 Cancels a running coroutine.
 

Protected Member Functions

override void Update ()
 Update.
 
- Protected Member Functions inherited from DinoFracture.FractureEngineBase
void RunOnMainThread (Action action)
 Run delegate on main thread.
 

Properties

static bool Suspended [get, set]
 True if all further fracture operations should be a no-op.
 
static bool HasFracturesInProgress [get]
 Returns true if there are fractures currently in progress.
 
static int MaxRunningFractures [get]
 The maximum number of async fractures we can process at a time. If this is set to 0 (default), an unlimited number can be run.
 
static bool ClearCacheDataInEditMode [get, set]
 If true, cached data used to speed up fracturing will be cleared when pre-fracturing inside the editor in edit mode. This helps reduce memory pressure after fracturing.
 
static bool ClearCacheDataTogglingPlayMode [get, set]
 If true, cached data used to speed up fracturing will be cleared when toggling play mode in the editor. This will reflect the state of a build upon startup.
 
- Properties inherited from DinoFracture.FractureEngineBase
static FractureEngineBase Instance [get, set]
 Internal instance.
 
static bool ForceSynchronousPreFractureInEditor [get]
 If true, pre-fracturing in the editor will always be synchronous.
 

Detailed Description

This component is created on demand to manage the fracture coroutines. It is not intended to be added by the user.

Member Function Documentation

◆ StartFracture()

static AsyncFractureResult DinoFracture.FractureEngine.StartFracture ( FractureDetails details,
FractureGeometry callback,
Transform piecesParent,
bool transferMass,
bool hideAfterFracture )
inlinestatic

Starts a fracture operation.

Parameters
detailsFracture info
callbackThe object to fracture
piecesParentThe parent of the resulting fractured pieces root object
transferMassTrue to distribute the original object's mass to the fracture pieces; false otherwise
hideAfterFractureTrue to hide the originating object after fracturing
Returns

Property Documentation

◆ ClearCacheDataInEditMode

bool DinoFracture.FractureEngine.ClearCacheDataInEditMode
staticgetset

If true, cached data used to speed up fracturing will be cleared when pre-fracturing inside the editor in edit mode. This helps reduce memory pressure after fracturing.

This value has no effect during play mode nor in builds; it will reset after the editor is closed.

◆ ClearCacheDataTogglingPlayMode

bool DinoFracture.FractureEngine.ClearCacheDataTogglingPlayMode
staticgetset

If true, cached data used to speed up fracturing will be cleared when toggling play mode in the editor. This will reflect the state of a build upon startup.

This value has no effect in builds; it will reset after the editor is closed.

◆ MaxRunningFractures

int DinoFracture.FractureEngine.MaxRunningFractures
staticget

The maximum number of async fractures we can process at a time. If this is set to 0 (default), an unlimited number can be run.

NOTE: Synchronous fractures always run immediately