Spawn prefabs in a circle?

I found this http://answers.unity3d.com/questions/170413/position-objects-around-other-object-forming-a-cir.html but the example given is in UnityScript and I’ve had trouble converting it to C#.

Is there a better way of doing the following:

1) Spawn enemies along a circular perimeter around a Vector3 point.

2) Vary the distance from the point.

If that is the best way, could someone help convert it to C#?
Here it is again:

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);
}

Here is the completed C# translation. You had the type wrong on line 2 and line 13. You were missing an ‘int’ on line 11.

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour {

	public int numObjects = 10;
	public GameObject prefab;

	void Start() {
		Vector3 center = transform.position;
		for (int i = 0; i < numObjects; i++){
			Vector3 pos = RandomCircle(center, 5.0f);
			Quaternion rot = Quaternion.FromToRotation(Vector3.forward, center-pos);
			Instantiate(prefab, pos, rot);
		}
	}

	Vector3 RandomCircle ( Vector3 center ,   float radius  ){
		float ang = Random.value * 360;
		Vector3 pos;
		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;
	}
}

try this code

int numObjects = 12;
public GameObject prefab;

void Start()
{
    Vector3 center = transform.position;

    for (int i = 0; i < numObjects; i++)
    {
        int a = i * 30;

        Vector3 pos = RandomCircle(center, 1.0f ,a);
        Instantiate(prefab, pos, Quaternion.identity);
    }

}

Vector3 RandomCircle(Vector3 center, float radius,int a)
{
    Debug.Log(a);
    float ang = a;
    Vector3 pos;
    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;
}

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