Search Unity

Editor is corrupting scene files?

Discussion in 'Editor & General Support' started by quinnbot, Jan 4, 2016.

  1. quinnbot

    quinnbot

    Joined:
    Sep 18, 2014
    Posts:
    10


    The editor appears to be corrupting all the float values in my scene file??

    Seems to happen intermittently so I can't provide a solid repro.... but the problem is aggravated by editing (any) value while playing in the editor, then changing the value again after stopping. Literally at my wits end on this one. Almost all plugins have been removed an almost all major elements of the scene have been removed to try an narrow it down but it still occurs.

    Has anyone seen behavior even close to this? Or have any thoughts on what might be causing it?
     

    Attached Files:

  2. quinnbot

    quinnbot

    Joined:
    Sep 18, 2014
    Posts:
    10
    In case anyone else ever sees this problem, I found the problem (tho for the life of me I cannot explain why). Basically it was caused by iterating backwards over the children of a transform and deleting them. You would think that this would be acceptable behavior, but if you do it Unity just randomly freaks out and destroys your scene files sometimes.

    Attached is an example of the code that was causing the problem. DO NOT EVER DO THIS
     

    Attached Files:

  3. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    Did you report it as a bug?