Navigation
API > API/Runtime > API/Runtime/MovieScene > API/Runtime/MovieScene/Evaluation > API/Runtime/MovieScene/Evaluation/FMovieSceneEntityComponentFieldB- > API/Runtime/MovieScene/Evaluation/FMovieSceneEntityComponentFieldB-/AddOneShotEntity
References
| Module | MovieScene |
| Header | /Engine/Source/Runtime/MovieScene/Public/Evaluation/MovieSceneEvaluationField.h |
| Include | #include "Evaluation/MovieSceneEvaluationField.h" |
| Source | /Engine/Source/Runtime/MovieScene/Private/Evaluation/MovieSceneEvaluationField.cpp |
void AddOneShotEntity
&40;
const TRange< FFrameNumber > & OneShotRange,
UObject &42; EntityOwner,
uint32 EntityID,
int32 InMetaDataIndex
&41;
Remarks
- Add a one-shot entity to the field for a given range. Equivalent to AddOneShotEntity(Range, FindOrAddEntity(EntityOwner, EntityID)).
-
One-shot entities are only ever alive for a single evaluation, regardless of the range within the field. This makes them ideal for events or triggers.
Parameters
| Name | Description |
|---|---|
| Range | The range within which this entity should be alive |
| EntityOwner | The owner that produces the entity at runtime. Must implement the IMovieSceneEntityProvider interface |
| EntityID | (Optional) An identifier used to identify the entity inside IMovieSceneEntityProvider::ImportEntityImpl. Could be an index within an array or a set of flags. |
| MetaDataIndex | (Optional) Meta-data to use for this entitiy within this range. See AddMetaData. |