Answers for "how to clone an object in unity at a certain position"

C#
1

how to clone an object in unity at a certain position

public GameObject Bullet;
public GameObject Bomber;
    void Start()
    {
        Bullet.transform.position = Bomber.transform.position; // you might have to attach this line to the object you want cloned
        (Bullet) = GameObject.Find("Bullet");
        (Bomber) = GameObject.Find("Bomber"); 
    }

    void Update()
    { 
            GameObject CloneOfGameOject = Instantiate(Bullet);       
    }
        
}
}
//im not sure if its the best but it works for me :P
Posted by: Guest on February-23-2021

Code answers related to "how to clone an object in unity at a certain position"

C# Answers by Framework

Browse Popular Code Answers by Language