Search Unity

Save the clone GameObject in SceneView after implementation the script.

Discussion in 'Scripting' started by DarkLir, Jan 28, 2015.

  1. DarkLir

    DarkLir

    Joined:
    Jan 12, 2015
    Posts:
    5
    Hello.

    How to save the clone GameObject in SceneView after implementation the script?

    public Transform prefab;
    // Use this for initialization
    void Start () {

    int i = 0;
    while (i < 10000) {
    Instantiate(prefab, new Vector3(i * 6.0F, -5, 0), Quaternion.identity) ;
    i++;
    }

    }
    Please help.