private void Start() { if (trackStartTime) { WebGlPlugins.AddTimeTrackingEvent("Start"); } }
private void Awake() { if (showInfoPanelByDefault) { WebGlPlugins.ShowInfoPanel(); } else { WebGlPlugins.HideInfoPanel(); } if (trackAwakeTime) { WebGlPlugins.AddTimeTrackingEvent("Awake"); } }
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); }
/// <summary> /// Logs the current memory usage /// Browser Usage: <code>unityGame.SendMessage("WebGL","LogMemory");</code> /// </summary> public void LogMemory() { WebGlPlugins.LogMemory(); }
/// <summary> /// Toggle the visibility of the info panel in the top right corner /// </summary> public void ToggleInfoPanel() { WebGlPlugins.ToggleInfoPanel(); }