Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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!