Skip to content

Commit 378aec6

Browse files
committed
[DOCS] Changes to lifetime components
1 parent d04b863 commit 378aec6

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

Docs/resources/lifetime-components.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,28 @@ Lifetime components are an optional feature. Their single purpose is to offer **
44

55
They are **not necessary** by any means to save your game since they only add some useful events.
66

7-
## Why can't I just use BeginPlay?
7+
## Why shouldn't I use BeginPlay?
88

9-
BeginPlay gets called every time game starts for that actor including when game starts, when you load, when the actor didn't exist...
9+
BeginPlay gets called every time the actor is created. This includes when game starts, but also when game loads and the actor didn't exist (so it gets spawned).
1010

11-
It's not a good representative of the lifetime of the actor. That is why Lifetime events are called only during the actor's lifetime. It doesn't matter if it was loaded, saved, destroyed, etc. It is kind of more deterministic.
11+
That is why BeginPlay is not a good representative of the lifetime of the actor. With that, Lifetime events can help, providing precise events that notify when the actor has been created for the first time, loaded, saved, etc.
1212

1313
![Lifetime Events](./img/lifetime_events.png)
1414

1515
## Events
1616

17-
#### Started
18-
17+
### Started
1918
Gets called only first time an actor is created.
2019

2120
- When you start a new game
2221
- When you spawn the actor
2322
- Wont be called when you load any game (**Resume** will be called instead)
2423

25-
#### Saved
26-
24+
### Saved
2725
Called when this actor is saved
2826

29-
#### Resume
30-
27+
### Resume
3128
Called when this actor is loaded. When opening a saved game from any level in any situation
3229

33-
#### Finish
34-
30+
### Finish
3531
Similar to EndPlay, but gets called when this actor **gets destroyed during gameplay or at normal endplay**. But wont be called when you load a game and this actor gets destroyed as a consequence.

0 commit comments

Comments
 (0)