Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Where would you store runtime game data?

Discussion in 'Project Tiny' started by Ferran_SP, May 21, 2019.

  1. Ferran_SP

    Ferran_SP

    Joined:
    Jul 9, 2018
    Posts:
    27
    Hi,
    I was wondering what would be the preferred approach to store runtime game data.
    Imagine you load data for one level of a game.
    Where would you store this data? In a global Config, or in a Component that belongs to a global Entity? As a member of a certain system that needs this data?
    I've seen the match3 sample uses cookies to do something similar, but I haven't found any documentation related to this.
    e.g.

    static getSelectedWorldMapIndex(): number {
    let cookieName = "SelectedWorldMapIndex";
    let value = this.getCookie(cookieName);
    ...


    Thanks for your input!