- Home /
Question by
Tinytouchtales · Jul 31, 2016 at 12:17 PM ·
editorcompiler
Scripts start to compile when play mode starts
Hi,
with version 5.4 i have this really weird bug where as soon as i hit play in the editor unity starts to compile scripts. This results in all sorts of errors. Is this behavior cause by a script calling unity to compile on play or is it a new bug with 5.4? I never encountered anything like it.
Comment
Answer by Tinytouchtales · Jul 31, 2016 at 03:04 PM
Ok, i've found out what caused this. It seems to be this code which i disabled now via #if statements:
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.Advertisements;
public class UnityAdsBuildProcessor : Editor
{
#if !UNITY_EDITOR
[PostProcessScene]
public static void OnPostprocessScene ()
{
AdvertisementSettings.enabled = true;
AdvertisementSettings.initializeOnStartup = false;
}
#endif
}