← Back to Docs
  • index.html
  • Clayground
  • Clayground Storage Module
  • Clayground 2025.2
  • Clayground Storage Module

    The Storage module provides simple persistent storage for game settings, player progress, and other data that needs to survive application restarts.

    Usage

    Import the module:

    import Clayground.Storage

    Example

    KeyValueStore {
        id: settings
        name: "MyGameSettings"
    }
    
    Component.onCompleted: {
        settings.set("highScore", "1000")
        let score = settings.get("highScore", "0")
        console.log("High score:", score)
    }

    Technical Notes

    See also KeyValueStore.

    KeyValueStore

    A persistent key-value storage component using SQLite database