Search Unity

Auto Refresh Turn on and Off

Discussion in 'Editor & General Support' started by GabeF, Aug 4, 2014.

  1. GabeF

    GabeF

    Joined:
    Sep 28, 2012
    Posts:
    38
    Hi Guys,

    I'd like to turn autorefresh off when closing out of the unity editor.
    I do this so next time unity loads, it doesn't automatically compile my data, only when I ask for it through a startup script at a certain point.

    But the editorPrefs command doesn't seem to work. I try and set the key:
    EditorPrefs.SetBool("kAutoRefresh_h2404942332", true);

    So that unity turns it's autorefresh feature on, but not only does this not set the key to on, it creates a duplicate key with a simmilar name. something like kAutoRefresh_h2404942332_h3910#####
    and sets that to on.

    I don't understand. I just want to programatically toggle the auto refresh on and off. Why is that so difficult?
     
  2. GabeF

    GabeF

    Joined:
    Sep 28, 2012
    Posts:
    38
    BUMP
     
  3. John Fallon

    John Fallon

    Unity Technologies

    Joined:
    Jul 1, 2014
    Posts:
    44
    A similar question was answered here.
     
  4. CoderMonkey

    CoderMonkey

    Joined:
    Sep 4, 2013
    Posts:
    1
    In case anyone wants to do the same in future, you just need to use the key "kAutoRefresh". This is helpful in the case where its just not code that you want to stop reloading.