I wrote this code to create 7 prefabs and rename the clones thus formed.This Code isnt working as anticipated.

Script doesnt rename the instantiated prefab.Rather, what i get is one clone and that not renamed.
Why is it so?How do I correct it?
I even tried on forums, but none of offered solutions worked.
Posted: 03:47 AM 1 Hour Ago

using UnityEngine;
using System.Collections;

public class CreateNew : MonoBehaviour {

public Object PathFloorUnit;
// Use this for initialization
void Start () {
for(int x=0;x<=6;x=+1){
Object pathRef;
pathRef=Instantiate(PathFloorUnit,new Vector3(0,0,10*x),Quaternion.identity);
pathRef.name="newName";
}
}
// Update is called once per frame
void Update () {

}
}

I wrote it to rename an instantiated prefab but this is not working.Why?And how can i correct it?

Use x++ instead of x=+1.

Yes that worked.Thanks.I want to add that the code in asset folder didnt change until i reset it.I think we have to reset the code after making changed in editor and saving.