Search Unity

List-size don't save in editor

Discussion in 'UGUI & TextMesh Pro' started by Kurando, Sep 7, 2014.

  1. Kurando

    Kurando

    Joined:
    Aug 14, 2013
    Posts:
    5
    I used list<class> and array() in my script, to assign multiple objects to a variable.
    But each time, I want to change the size of the list/array in the inspector, it doesn't save my input.

    Example: Size is 0. I change it to 5. Leave the field. It jumps back to 0.

    In an older project, where it worked fine, there is this bug, too. Size is 8. I change it. Leave the field. It jumps back to 8.

    Since it worked months ago in my older project, it must be a unity-bug, not a bug in my script.
     
  2. Murkas

    Murkas

    Joined:
    Jul 24, 2013
    Posts:
    7
    Are you just entering the new value and then click outside the field? If so, you have to press 'enter' before clicking anywhere else.
     
  3. Kurando

    Kurando

    Joined:
    Aug 14, 2013
    Posts:
    5
    Thank you :)

    I forgot it... I used the lists months ago and now I forgot it.
    So this 'problem' is solved.

    But maybe it would be good, when the changes would be saved automatically, without pressing ENTER.