Эта функция принимает в качестве параметров объект, вокруг которого вы хотите перемещать кнопки, объект игрока, чтобы вы могли ориентировать новые кнопки к игроку, угол, под которым вы хотите, чтобы кнопка была, и радиус (расстояние до кнопки будет от кнопки Центр). Его вывод - это положение кнопки в мировом пространстве. Вы можете вызывать его для каждой кнопки, которую хотите добавить.
Vector3 positionButton(GameObject buttonCenter, GameObject player, float angle, float radius) {
//get the up and right vectors from the player object so we can orient the buttons
Vector3 up = player.transform.up;
Vector3 right = player.transform.right;
angle = Mathf.Deg2Rad * angle; //convert degrees to radians. radians=degrees * 2pi / 360
//cos(angle) give an x coordinate, on a unit circle centered around 0
//sin(angle) is the y coordinate on the unit circle
//take those values, multiply them by the up and right vectors to orient them to the player,
//multiply by the radius to move them the correct distance from the buttoncenter,
//and add the buttoncenter position so they circle around the correct point
Vector3 buttonPos =buttonCenter.transform.position + (radius * right * Mathf.Cos(angle)) + (radius* up * Mathf.Sin(angle));
return buttonPos;
}