Player Data stores the default information for a player character. Using ScriptableObjects allows multiple game systems to share the same data asset while keeping gameplay logic separate.
- Player Name
- Health
- Maximum Health
- Level
- Experience
- Coins
- Movement Speed
- Attack Damage
ScriptableObjects make player data reusable and easy to edit without changing code.
- Cleaner project architecture
- Centralized data management
- Easy balancing by designers
- Reusable across multiple scenes
- Better maintainability
PlayerData
├── Player Name
├── Health
├── Max Health
├── Level
├── Experience
├── Coins
├── Speed
└── Damage
- RPG games
- Platformer games
- Action games
- Mobile games
- Store only default values in ScriptableObjects.
- Keep runtime values in separate classes or managers.
- Organize assets into folders such as
Assets/Data/Player.
- Modifying ScriptableObject assets during gameplay.
- Storing temporary runtime data directly in the asset.
- Mixing gameplay logic with data definitions.
Player Data ScriptableObjects provide a clean and scalable way to manage default player settings while keeping Unity projects organized.