17 lines
448 B
C#
17 lines
448 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
using Screen = UnityEngine.Screen;
|
|
|
|
namespace FilGoodBandits
|
|
{
|
|
public class SafeArea : MonoBehaviour
|
|
{
|
|
IEnumerator Start()
|
|
{
|
|
var rect = GetComponent<RectTransform>();
|
|
var originalPos = rect.anchoredPosition;
|
|
rect.anchoredPosition = new Vector2(originalPos.x, originalPos.y - Screen.safeArea.y);
|
|
yield return null;
|
|
}
|
|
}
|
|
} |