Skip to content

๐Ÿง  Working with Variables

The Saveable component allows storing key-value string pairs during runtime.


๐Ÿ” Blueprint Functions

โ„น๏ธ All Saveable variables are stored as strings internally. Use GetVariableAsInt or manual conversion for numeric operations.

โœ… Saveable variables are ideal for counters, flags, or state values that don't need to exist as native Blueprint variables.

Available under Save Kit โ†’ Saveable:

  • SetVariable(Name, Value) โ€” set a string value at runtime
  • GetVariable(Name) โ€” get string value
  • GetVariableAsInt(Name) โ€” parse as integer
  • HasVariable(Name) โ€” check if variable exists
  • IncrementVariable(Name, Amount) โ€” add to numeric value
  • RemoveVariable(Name) โ€” delete variable

Saveable Blueprint functions


โš™๏ธ Example: Using Saveable Functions

Use Saveable functions to manage data at runtime:

  • SetVariable โ€” assign a value
  • GetVariableAsInt โ€” retrieve and modify numeric values
  • IncrementVariable โ€” track counts or scores

Using Saveable: Set, Increment, SaveGame

Example: reducing Health, marking as Damaged, and incrementing HitCount.


๐Ÿ†š Saveable Variables vs SaveGame Properties

Use Saveable for lightweight, flexible runtime data.
Use SaveGame for Blueprint-visible variables and type-safe access.

Method Defined In Access at Runtime Saved by SaveKit
Saveable Variables Saveable Component โœ”๏ธ via Blueprint nodes โœ”๏ธ Yes
SaveGame UPROPERTY Actor/Blueprint field โœ”๏ธ directly (Get/Set) โœ”๏ธ Yes (if serializable)

Use Saveable for flexible runtime state, and SaveGame for native Blueprint variables.

SaveGame property example

Note: Actor transform, tags, and SaveGame properties are also saved.
See Saving & Loading for details.


๐Ÿงช Example: Displaying Saved Data

Use GetVariable, Tags, and SaveGame properties to dynamically show state:

Displaying Saveable + SaveGame

This Blueprint formats and displays Health, HitCount, Tags, and Damaged state.


๐Ÿšซ Limitations of Saveable Variables

โš ๏ธ Only string values are supported in Saveable variables. Complex types like vectors, rotators, and structs are not supported.

  • UObject references
  • Arrays of objects

Use IDs or reconstruct them manually after loading.

โ„น๏ธ See Limitations for serialization compatibility.