facebook twitter hatena line email

Unity/WebGL/画面縦横幅拡大

提供: 初心者エンジニアの簡易メモ
2022年12月1日 (木) 15:09時点におけるAdmin (トーク | 投稿記録)による版

移動: 案内検索

WebGLで出力されてたcanvasを100%にする方法

  1. http://corevale.com/unity/1636 にある以下の.webgl-content * {}スタイルシートで、TemplateData/style.cssを更新
  2. index.htmlに記載されてる縦幅横幅を100%に変更。
  3. 出力されたhtmlに以下記載されてることを確認
<link rel="stylesheet" href="TemplateData/style.css">

参考:http://corevale.com/unity/1636

右に表示されてしまうのを中央表示に変更する方法

TemplateData/style.css body {

   text-align: center;

}