5 ways you can store variables and access them from anywhere within your project.
Methods:
- Data Tables
- Function libraries
- Actor components
- Data assets
- Class defaults
- Game instance, game mode, and game state
You can store colours, floats, arrays, vectors, textures β literally whatever. Store them all in a clever place to reduce time spent editing your code when you make changes, while also reducing your dependencies for clean migration.
Example cases:
- Colour palettes / libraries
- Float tables for movement parameters (gravity, speed, and so on)
- Enemy/character health
- Game versioning / watermarking
- Achievement lists
https://dev.epicgames.com/community/learning/tutorials/klXB/unreal-engine-smart-data-storage-5-ways-to-store-and-access-global-variables-in-blueprints