private void Start()
 {
     if (trackStartTime)
     {
         WebGlPlugins.AddTimeTrackingEvent("Start");
     }
 }
        private void Awake()
        {
            if (showInfoPanelByDefault)
            {
                WebGlPlugins.ShowInfoPanel();
            }
            else
            {
                WebGlPlugins.HideInfoPanel();
            }

            if (trackAwakeTime)
            {
                WebGlPlugins.AddTimeTrackingEvent("Awake");
            }
        }
예제 #3
0
        private static void SetGlobalVariables()
        {
            var    graphicsDevice = SystemInfo.graphicsDeviceType;
            string webGl          = string.Empty;

            switch (graphicsDevice)
            {
            case GraphicsDeviceType.OpenGLES2:
                webGl = "WebGL 1";
                break;

            case GraphicsDeviceType.OpenGLES3:
                webGl = "WebGL 2";
                break;

            default:
                webGl = graphicsDevice.ToString();
                break;
            }
            WebGlPlugins.SetVariable("webGlVersion", webGl);
            WebGlPlugins.SetVariable("unityVersion", Application.unityVersion);
        }
예제 #4
0
 /// <summary>
 /// Logs the current memory usage
 /// Browser Usage: <code>unityGame.SendMessage("WebGL","LogMemory");</code>
 /// </summary>
 public void LogMemory()
 {
     WebGlPlugins.LogMemory();
 }
예제 #5
0
 /// <summary>
 /// Toggle the visibility of the info panel in the top right corner
 /// </summary>
 public void ToggleInfoPanel()
 {
     WebGlPlugins.ToggleInfoPanel();
 }