Web Player not outputting to console / log file

Hi there,

No useful information appears to be getting outputted to console when running on Unity Web Player (tested in Safari on OSX Yosemite, Unity 5.1.1f1).

i.e. No Debug.Log, Debug.LogError or System.Exceptions are appearing in the WebPlayer.log file. Only startup and exit information.

To test this, I created an empty scene with a Text label, and this script attached to the Camera:

public class TestConsole : MonoBehaviour
{
    public Text text;
  
    void Update()
    {
        text.text = "Before Text Message";
        Debug.Log ("Debug.Log Message");
        Debug.LogError ("Debug.LogError Message");
        throw new System.Exception("Throw new System.Exception message");
        text.text = "After Text Message";
    }
}

In the Editor and Web Player, the Text label is set to “Before Text Message”, which means that the script is running and the Exception is being thrown.

When run in the Editor, the Editor log shows the information regarding the Debug.Log, Debug.LogError and System.Exception calls. When run in the Web Player, all I get is this:

Any ideas? I’m sure this will turn out to be something simple like an Editor setting or something!

All the best,
Joel

Um, I have 5.0.0f4, OSX 10.10.3, and Safari 8.0.6. A web player build with a Debug.Log() inside my Update() function dumps data to ~/Library/Logs/Unity/Player.log as per the docs. I think the WebPlayer.log is just messages from the plugin starting up.

Thanks for the reply Graham.

The Web Player section of the docs actually says that it should be dumped to WebPlayer.log (see screenshot), so someone might want to change the documentation so that it’s less confusing.

I can however confirm that it’s being dumped to Player.log.

  • Joel

Lol… I didn’t notice that… I’ve fixed it, and there’ll be an update to the online docs in a few days.

1 Like