Web player loading progress "first"

I am trying to check if the web player is loaded in the browser itself. I was looking at the documentation here http://docs.unity3d.com/Documentation/Manual/WorkingwithUnityObject.html while trying to figure out how to check if the game has loaded. I noticed that the “first” under “pluginStatus”, and thought that would indicate the first frame after the game has loaded. Well, it says "called after the plugin have been installed at the first frame of the game is played (This will not be called if the plugin was already installed previously) ", which sounds like it will only use “first” if the plugin (and by that I assume either the game or the webplayer plugin) was previously installed, they won’t call “first”. But through all my tests, “first” is called every first frame of every load of my app. I tried this in both a debug build and release build, and both times, first is called. I launched the same html 3 times all at once, and first was called every time.

So is it safe to assume that the documentation is terrible, and that first actually does indicate the first frame of the app after loading every time?

As example, here’s a script i wrote ages ago. It will read the URL of the webpage the webplayer is loaded in:

using UnityEngine;
using System.Collections;

public class URLParameters : MonoBehaviour
{
    public static bool HaveInformation = false;
    public static string Href;
    public static string Hash;
    public static string Host;
    public static string Hostname;
    public static string Pathname;
    public static string Port;
    public static string Protocol;
    public static string Search;

    public void Start()
    {
        if (Application.isWebPlayer)
    	    Application.ExternalEval ("GetUnity ().SendMessage ('"+gameObject.name+"', 'SetAddressComponents', location.href +'|'+ location.hash +'|'+ location.host +'|'+ location.hostname +'|'+ location.pathname +'|'+ location.port +'|'+ location.protocol +'|'+ location.search);");
    }

    public void SetAddressComponents (string aData)
    {
        string[] parts = aData.Split('|');
        Href = parts[0];
        Hash = parts[1];
        Host = parts[2];
        Hostname = parts[3];
        Pathname = parts[4];
        Port = parts[5];
        Protocol = parts[6];
        Search = parts[7];
        HaveInformation = true;
    }
}

Inside Unity “HaveInformation” can be used to check if the information has arrived. Of course it might be a good idea to implement a timeout in the event the user disabled Javascript in the browser of any other problem that prevents the JS to return the information.

Are you looking for MonoBehaviour.OnLevelWasLoaded?