Search Unity

Editor: GUIStyle lost on Project Run?

Discussion in 'Editor & General Support' started by Juice-Tin, Sep 2, 2014.

  1. Juice-Tin

    Juice-Tin

    Joined:
    Jul 22, 2012
    Posts:
    244
    Sorry if this is in the wrong place, not sure where to post for creating custom editor code.

    I have created a custom editor and set a Texture as a GUIStyle for a box


    However when hitting the project's Run button and then stopping it, all the GUIStyles are lost on my editor:


    I've done 3 custom editors so far, and all have the same problem. All GUIStyles lost, to the point where I had to make a button on them to recreate the textures and styles.

    How can I make it keep the styles?
    (That waveform needs to be generated, so it takes a minute every time just to get the image back, very frustrating)

    Thanks!
     
    Last edited: Sep 2, 2014