GameObject.FindWithTag throws an exception since updating to Unity 5.6, but only in WebGL export, not in Editor

I updated my project to Unity 5.6.0f3 last week, without changing anything else about the project.

In some scenes, I search for a GameObject by tag when the scene is loaded. Ever since updating to 5.6, this throws an exception once exported to WebGL. It works as intended in the editor, however.

I’m currently catching the exception and looping and waiting until I find the GameObject, but it never finds it:
(Sorry for the hideous code, I added a lot of logs to see where it gets stuck in the build)

		GameObject glwGO;
        GameLogicWorld glW;

		yield return new WaitForSeconds(0.5f);
		while (glW == null) {
			Debug.Log("A: glw is null, looping to try and find it");
			try {
				glwGO = GameObject.FindWithTag ("GameLogic");
				Debug.Log("B: tried finding glwGO, found: " +;

				glW = glwGO.GetComponent<GameLogicWorld> ();
				Debug.Log("D: tried finding glW, found: " +;
			catch {
				Debug.Log("E: Caught exception");

			Debug.Log("F: Waiting 0.2s");
			yield return new WaitForSeconds(0.2f);

In the editor, all of this works. It takes a few loops to find the GameLogicWorld script, but it finds the object and all components on it.

(The reason why it takes several loops is that I call the Coroutine already before the scene is fully loaded)

In the build however, I never even get the Debug Log “B”, an exception is thrown at GameObject.FindWithTag, and then the loop goes on until forever, never finding the object, always throwing exceptions.

I know that issues with FindWithTag can arise from the game objects simply not being there, but since the GameObject clearly exists in my scene when I test in the editor, I’m confused.

  • Did anything change about the GameObject.FindWithTag() call in Unity 5.6? I could not find anything about this.
  • Does the FindWithTag() call throwing an exception definitely mean that the object I’m searching for doesn’t exist? Since it exists in the editor, what can I do to find out what happens to the GameObject?

Afaik nothing changed, please file a bug report as explained under Unity QA - Bug Reporting - Unity