You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
393 B
19 lines
393 B
using UnityEngine; |
|
|
|
namespace Utils |
|
{ |
|
public class UiScaler : MonoBehaviour |
|
{ |
|
|
|
[SerializeField] private RectTransform _rect; |
|
|
|
private void Awake() |
|
{ |
|
if (Screen.height > 1920) |
|
_rect.sizeDelta = new Vector2(Screen.width, Screen.height); |
|
else |
|
_rect.sizeDelta = new Vector2(1080, 1920); |
|
} |
|
|
|
} |
|
}
|
|
|