<p>ã¢ã¹ãã¯ãæ¯ã®éãã§çããç»é¢ãµã¤ãºãåå¾ãã¾ãã</p>
<h2>åºæ¬è¨å®</h2>
<p>Canvasã«ãããCanvas Scalerãã®è¨å®ãä¸è¨ã®ããã«ãã¦ãã¾ãã</p>
<ul>
<li>[ Canvas Scaler ] → UI Scale Mode => Scale With Screen Size</li>
<li>[ Canvas Scaler ] → Reference Resolution => x : 1920 Y : 1080</li>
<li>[ Canvas Scaler ] → Screen Match Mode => Match Width Or Height</li>
</ul>
<h2>ãµã¤ãºåå¾</h2>
<p>[ Canvas Scaler ] → Match => Height(1)ã§è¨å®ãã¦ããå ´å</p>
<div class="hcb_wrap">
<pre class="prism undefined-numbers lang-csharp" data-lang="C#"><code> 
float defaultAspect = 1920f / 1080f; 
float currentAspect = Screen.width / (float)Screen.height; 
float ratio = currentAspect / defaultAspect; 
 
int maxScreenWidth = Mathf.RoundToInt((1920f * ratio); 
int maxScreenHeight = 1080; // Heightã¯å¤ããã¾ãã 
</code></pre>
</div>
<p>[ Canvas Scaler ] → Match => Width(0)ã§è¨å®ãã¦ããå ´å</p>
<div class="hcb_wrap">
<pre class="prism undefined-numbers lang-csharp" data-lang="C#"><code> 
float defaultAspect = 1080 / (float)1920; 
float currentAspect = Screen.height / (float)Screen.width; 
float ratio = currentAspect / defaultAspect; 
 
int maxScreenWidth = 1920; // Widthã¯å¤ããã¾ãã 
int maxScreenHeight = Mathf.RoundToInt(1080f * ratio); 
</code></pre>
</div>