コード例 #1
0
 private void Start()
 {
     if (trackStartTime)
     {
         WebGlPlugins.AddTimeTrackingEvent("Start");
     }
 }
コード例 #2
0
        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();
 }