【Unity WebGL 打包技巧】

UnityWebGL打包技巧

请添加图片描述

请添加图片描述

请添加图片描述

请添加图片描述
请添加图片描述

 "backgroundUrl": "BeiJin.jpg",
.webgl-content * {
    border: 0;
    margin: 0;
    padding: 0
}

.webgl-content {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

    .webgl-content .logo, .progress {
        position: absolute;
        left: 50%;
        bottom: 5%;
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
    }

    .webgl-content .logo {
        background: url('progressLogo.Light.png') no-repeat center / contain;
        width: 154px;
        height: 130px;
    }

    .webgl-content .progress {
        height: 50px;
        width: 80%;
        margin-top: 20px;
    }

        .webgl-content .progress .empty {
            background: url('progressEmpty.Light.png') no-repeat right / cover;
            float: right;
            width: 100%;
            height: 100%;
            display: inline-block;
        }

        .webgl-content .progress .full {
            background: url('progressFull.Light.png') no-repeat left / cover;
            float: left;
            width: 0%;
            height: 100%;
            display: inline-block;
        }

    .webgl-content .logo.Dark {
        background-image: url('progressLogo.Dark.png');
    }

    .webgl-content .progress.Dark .empty {
        background-image: url('progressEmpty.Dark.png');
    }

    .webgl-content .progress.Dark .full {
        background-image: url('progressFull.Dark.png');
    }

    .webgl-content .footer {
        margin-top: 5px;
        height: 38px;
        line-height: 38px;
        font-family: Helvetica, Verdana, Arial, sans-serif;
        font-size: 18px;
    }

        .webgl-content .footer .webgl-logo, .title, .fullscreen {
            height: 100%;
            display: inline-block;
            background: transparent center no-repeat;
        }

        .webgl-content .footer .webgl-logo {
            background-image: url('webgl-logo.png');
            width: 204px;
            float: left;
        }

        .webgl-content .footer .title {
            margin-right: 10px;
            float: right;
        }

        .webgl-content .footer .fullscreen {
            background-image: url('fullscreen.png');
            width: 38px;
            float: right;
        }

function Reset() {
            var canvas = document.getElementById("#canvas");
            canvas.height = document.documentElement.clientHeight;
            canvas.width = document.documentElement.clientWidth;
        }
    </script>
</head>
<body onload="Reset()" onresize="Reset()">
    <div class="webgl-content" style="width:100%;height:100%">
        <div id="gameContainer" style="width: 100%; height: 100%"></div>
        <div class="footer">
            <div class="webgl-logo"></div>
            <div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
            <div class="title">TaFangShouWeiZhe</div>
        </div>
    </div>
</body>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

你賴東東不錯嘛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值