Skip to content

WebGLで画面のアスペクト比を固定しつつ、画面サイズをWebブラウザーの表示に合わせて変更するサンプルプロジェクト(A sample project that uses WebGL to fix the screen aspect ratio and change the screen size to match the web browser display.)

Notifications You must be signed in to change notification settings

Miyakovsky/UnityWebGLCanvasFitScreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityWebGLCanvasFitScreen

UnityのWebGLで画面のアスペクト比を固定しつつ、画面サイズをWebブラウザーの表示に合わせて変更するサンプルプロジェクトです。

DemoURL
https://miyakovsky.github.io/UnityWebGLCanvasFitScreen/

導入方法

WebGLCanvasFitScreen\Assets\WebGLTemplates\MyProjectSettingフォルダを導入するプロジェクトに入れます。 WebGLCanvasFitScreen\Assets\WebGLTemplatesフォルダを導入するプロジェクトのAssetsにコピーするか、WebGLTemplatesがすでにある場合はMyProjectSettingフォルダのみをWebGLTemplatesへコピーすれば大丈夫です。

使用方法

  • プロジェクト設定をWebGLにする

  • Project SettingsでResolutinの解像度の設定をする

  • WebGL TemplateをMyProjectSettingに変更する

  • Build And Runを実行して、WebGLで出力して動作確認をする

About

WebGLで画面のアスペクト比を固定しつつ、画面サイズをWebブラウザーの表示に合わせて変更するサンプルプロジェクト(A sample project that uses WebGL to fix the screen aspect ratio and change the screen size to match the web browser display.)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published