Can I create a game for webgl without the Unity lo

2020-04-30 01:36发布

Can I create a game for webgl without the Unity logo when I download and without title "Unity webGL"? . example

2条回答
趁早两清
2楼-- · 2020-04-30 02:12

According to the docs you need a Pro license to remove the splash screen. (the logo in the middle of the screen)

As for the frame around the game that's easy to change, just change the HTML as documented here. You can choose either one of the defaults or create your own template.

According to those docs you create folder in Assets called WebGLTemplates and inside that create a new folder for your template like BetterTemplate. Inside that put an index.html file and any other images, css, JavaScript files you want included with your game.

The index.html could look something like this

<!DOCTYPE html>
<html lang="en-us">

  <head>
    <meta charset="utf-8">
    <title>%UNITY_WEB_NAME%</title>
    <style>
      body { margin: 0; }
      #gameContainer { width: 100vw; height: 100vh; }
      canvas { width: 100%; height: 100%; }
    </style>
    <script src="Build/UnityLoader.js"></script>
    <script>
    var gameInstance = UnityLoader.instantiate("gameContainer", "Build/dist.json");
    </script>
  </head>

  <body>
    <div id="gameContainer"></div>
  </body>

</html>

Then you pick Edit->Project Settings->Player from the menus and under the WebGL tab choose your template

Here's an example that provides a custom logo. The part that's not removable without a Pro license is the "Made with Unity" that appears just before the game starts.

查看更多
干净又极端
3楼-- · 2020-04-30 02:16

With the personal license you are unable to legally remove the Unity splash screen. You need the Plus or Pro license. Plus costs $35 a month, Pro is $125 a month.

The majority of the features of Plus and Pro are not needed for smaller projects and with no hurt your development. All engine features are the same across the board, so you can always develop you game with a personal license.

When it comes time to launch you can buy Plus or Pro and remove the splash screen and take advantage of the performance reporting and analytics features that come with it.

查看更多
登录 后发表回答