ue5-gameplay-state-ownership

Installation
SKILL.md

Gameplay State Ownership

Almost every "where should this live?" question in UE5 has one correct answer, and it is determined by a single property: how long the state must survive.

The classes exist at different lifetimes. State placed in a class that dies sooner than the state needs is lost; state placed in a class that outlives it leaks into the next round and appears as a bug that only shows up on the second playthrough. Both are decided at the moment the variable is declared, and both are cheap then and expensive later — moving state is not a refactor of one field, it is a refactor of everything that reads it.

The default failure is putting things on the Pawn, because the Pawn is what you have a pointer to. A Pawn is one of the shortest-lived things in the project.

Assign by lifetime, before declaring the variable

Installs
1
GitHub Stars
5
First Seen
5 days ago
ue5-gameplay-state-ownership — lichamnesia/unreal-engine-agent-skills