Position objects around other object forming a circle

I have an object at some position. I need to spawn other objects and place them at random positions around this object, forming a circle with center on the first object and at some x distance(radius) from it. How can i calculate the transform position that i need to place the objects ?

Thank You

You can use the function below - it returns a Vector3 position with the center and radius specified:

function RandomCircle(center:Vector3, radius:float): Vector3 {
    // create random angle between 0 to 360 degrees
    var ang = Random.value * 360;
    var pos: Vector3;
    pos.x = center.x + radius * Mathf.Sin(ang * Mathf.Deg2Rad);
    pos.y = center.y + radius * Mathf.Cos(ang * Mathf.Deg2Rad);
    pos.z = center.z;
    return pos;
}

// How to use:

    var center = transform.position;
    for (i = 0; i < numObjects; i++){
        var pos = RandomCircle(center, 10);
        // make the object face the center
        var rot = Quaternion.FromToRotation(Vector3.forward, center-pos);
        Instantiate(prefab, pos, rot);
    }

you can watch this plugin: Circle Objects Manager | GUI Tools | Unity Asset Store, I think it’s what you want