// Use this for initialization void Start() { refr = Instantiate(prefab, TargetHelper.getPositionIn(GetComponent <Rigidbody> (), 10), Quaternion.identity); }
// Update is called once per frame void Update() { Destroy(refr); refr = Instantiate(prefab, TargetHelper.getPositionIn(GetComponent <Rigidbody> (), 10), Quaternion.identity); }