LocalToScreen() публичный статический Метод

public static LocalToScreen ( Vector3 localPosition, Transform transform ) : Vector2
localPosition Vector3
transform UnityEngine.Transform
Результат Vector2
Пример #1
0
        public static Vector2 PixelToScreen(Vector2Int pixelPosition, Transform transform, Sprite sprite, bool clamp)
        {
            Vector2 uvPosition     = Utility.PixelToUv(pixelPosition, sprite, clamp);
            Vector3 localPosition  = Utility.UvToLocal(uvPosition, sprite, clamp);
            Vector2 screenPosition = Utility.LocalToScreen(localPosition, transform);

            return(screenPosition);
        }