float canvasScale = GetComponentInParent<Canvas>().GetComponent<RectTransform>().localScale.x; //берем RectTransform канваса у меня это на дочерним объекте(хотя наверно тут y )
float absoluteWidth = obj.rect.width / 2; //obj - background canvas, ну что там надо вырезать
float realWidth = absoluteWidth * canvasScale; // по идеи это что нужно
//Clamp(y,yMin,yMax-realWidth);
List<int> myList = new List<int>();
myList.Add(2);
myList.Add(11);
Debug.Log("Первый элемент: " + myList[0]);
Debug.Log("Второй элемент: " + myList[1]);
SendList(myList);
Debug.Log("Первый элемент: " + myList[0]);
Debug.Log("Второй элемент: " + myList[1]);
}
void SendList(List<int> a)
{
a.RemoveAt(0);
}
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask)