我可以为没有Unity徽标的webgl创建游戏吗? [英] Can I create a game for webgl without the Unity logo?
问题描述
我可以在下载时没有标题"Unity webGL"的情况下为没有web徽标的webgl创建游戏吗? . 示例
Can I create a game for webgl without the Unity logo when I download and without title "Unity webGL"? . example
推荐答案
根据docs,您需要具有Pro许可才能删除初始屏幕. (屏幕中间的徽标)
According to the docs you need a Pro license to remove the splash screen. (the logo in the middle of the screen)
对于易于更改的游戏框架,只需将HTML更改为记录在这里.您可以选择默认值之一,也可以创建自己的模板.
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.
根据这些文档,您在Assets
中创建名为WebGLTemplates
的文件夹,并在其中为模板(如BetterTemplate
)创建一个新文件夹.在其中放置一个index.html
文件以及要包含在游戏中的任何其他图像,css和JavaScript文件.
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.
index.html可能看起来像这样
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>
然后,从菜单中选择编辑"->项目设置"->播放器",然后在"WebGL"标签下选择模板
Then you pick Edit->Project Settings->Player from the menus and under the WebGL tab choose your template
这是提供自定义徽标的示例.没有Pro许可证就无法删除的部分是游戏开始前出现的用Unity制作".
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.
这篇关于我可以为没有Unity徽标的webgl创建游戏吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!