Hello everybody,
I just wondered if it is possible to run some code only in the game view and other only in a built WebGL?
Sofar I thought PlatformDependentCompilation would do exactly that, but I get Logs for both cases in the game view, although it should be one or the other, right?
If I do run this:
public void Awake() {
#if UNITY_EDITOR
source_local = true;
Debug.Log("source_local = true");
#endif
#if UNITY_WEBGL
source_local = false;
Debug.Log("source_local = false");
#endif
}
Although I should only get the log from the #if UNITY_EDITOR I get in the game views console in Unity 2021.1.15f1 on Windows I get both logs:
source_local = true
UnityEngine.Debug:Log (object)
source_local = false
UnityEngine.Debug:Log (object)