Search Unity

Feedback With "Recompile After Finished Playing", EditorApplication.isCompiling is true while playing

Discussion in 'Editor & General Support' started by idbrii, Jun 4, 2019.

  1. idbrii

    idbrii

    Joined:
    Aug 18, 2014
    Posts:
    51
    On 2018.3.13f1:

    1. Enable With "Recompile After Finished Playing" in Editor Preferences > General
    2. Play to run the game
    3. Modify code
    4. EditorApplication.isCompiling becomes true

    I would expect it to stay false until Application.isPlaying becomes false (since compilation doesn't start until playing stops). My expected behaviour would allow native plugins (like fmod) to use EditorApplication.isCompiling to clean themselves up before the managed code is reloaded (and references are lost). With the current behaviour, they try to clean themselves up every frame which makes the "Recompile After Finished Playing" option useless with fmod (it inits and cleans up every frame which unsurprisingly kills performance).