This is probably not the best solution in terms of performance but the easiest thing you could do (and this may be okay if you limit the number of toppings) would be to iterate though all topping positions and check the angles between them (you can find someone looking for a similar solution here) This would require iteration through an array while in array giving you performance of O(n^2) which is usually not okay but in some cases could be acceptable.
While I haven't been able to test this, you could possibly reduce performance to O(n) by iterating through the array of toppings once and comparing the angle between topping 0 and topping n to find the topping with the largest angle. Then iterate through again and compare all toppings to the previous max. If any angle is greater than 180 then you know your player is not yet good enough to work at Papa's Pizzeria.
Here is some rough pseudo code. Note that the GetAngleBetween function might not be able to handle obtuse angles, you may need to use cross products to check what side of the line transform B is when compared to the line formed by transform A and the pizza origin. Note that this also doesn't check things like the bounds of your topping only the center point (which honestly is probably fine as long as none of your virtual clients have allergies).
float GetAngleBetween(Tranform a, Transform b)
{
return angle = Mathf.Atan2(b.position.y - a.position.y, b.position.x - a.position.x) * 180.0f / Mathf.PI; // You may need to use cross product for angles over 180
}
bool CheckToppings(List<Transform> toppings, float angleLimit)
{
// Find farthest topping to one side
int maxToppingIndex = 0;
float maxAngle = 0.0f;
for (int toppingIndex = 0; toppingIndex < toppings.Count; toppingIndex++)
{
float angle = GetAngleBetween(toppings[maxToppingIndex], toppingx[toppingIndex]);
if (angle > maxAngle)
{
maxToppingIndex = toppingIndex;
maxAngle = angle;
}
}
// Find farthest topping to the other side
int maxToppingIndex2 = maxToppingIndex; // cache this for later
maxAngle = 0.0f;
for (int toppingIndex = 0; toppingIndex < toppings.Count; toppingIndex++)
{
float angle = GetAngleBetween(toppings[maxToppingIndex], toppingx[toppingIndex]);
if (angle > maxAngle)
{
maxToppingIndex = toppingIndex;
maxAngle = angle;
}
}
return GetAngleBetween(toppings[maxToppingIndex], toppings[maxToppingIndex2]) <= angleLimit;
}