Search Unity

Saving Lists across scenes

Discussion in 'Scripting' started by curtisrollo, Sep 20, 2017.

  1. curtisrollo

    curtisrollo

    Joined:
    Jul 12, 2017
    Posts:
    22
    Hello guys,

    Thanks for your help, first of all.

    Currently, I am making vocab quiz type game, where I would like to have mistaken vocab to be repeated, and I want to get some help on making the scenes work.

    So far the game consists of:

    Scene 1: Construct the Vocab List from a masterlist, and add any incorrect words into a "to be repeated" list.
    Scene 2: Show the score of the game, and press button to restart game at Scene 1.

    I want to hold the "to be repeated" list back to scene one to use but I have two problems:
    1) The list of custom object does not carry over the scene.
    2) On returning to scene 1, it would reinitiate the process of constructing the vocab list from the masterlist, and clearing the "to be repeated" list as it is initiated again.

    Any help on how to solve these issues? Much thanks.

    curtis
     
  2. fire7side

    fire7side

    Joined:
    Oct 15, 2012
    Posts:
    1,819
  3. curtisrollo

    curtisrollo

    Joined:
    Jul 12, 2017
    Posts:
    22
    Thanks, let me check it out.