360度 敵を生成

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Collections.Generic;

public class enemyInst : MonoBehaviour
{
	float time;
	//生み出す敵のオブジェクト
	public GameObject EnemyObj;
	//プレイヤーのオブジェクト
	GameObject PlayerObj;

	//半径
	private float _radius = 10;

	// Start is called before the first frame update
	void Start()
    {
		//プレイヤーを探す
		PlayerObj = GameObject.Find("Player");
	}

    // Update is called once per frame
    void Update()
    {
		//時間を計測 1で1秒
        time += Time.deltaTime;
		if (time >= 1) {
			//リセット
			time = 0;

			//敵を生成
			GameObject obj = Instantiate(EnemyObj);
			//初期位置
			Vector3 childPostion = transform.position;

			//何度か
			float angle = Random.Range( 0, 360) * Mathf.Deg2Rad;
			//360度の位置を設定
			childPostion.x += _radius * Mathf.Cos(angle);
			childPostion.y = transform.position.y;
			childPostion.z += _radius * Mathf.Sin(angle);
			//位置を入れる
			obj.transform.position = childPostion;
			//自機の方を向く
			obj.transform.LookAt(PlayerObj.transform);

			//リジットボディの取得
			Rigidbody rb = obj.GetComponent<Rigidbody>();
			//吹き飛ばす
			rb.AddForce(obj.transform.forward * 5.0f, ForceMode.Impulse);
		}
	}
}