Начал делать меню для своего проекта, сделал "начать игру" ..."выход", и т.д. И столкнулся с такой проблемкой что нужно бы сделать таак что когда заходишь в игру выбираешь траспорт, то есть допустим заходим в игру открывается окно с кнопками, при нажатии на кнопку загружается Префаб или объект, пробывал скрипты на клонирование, дестроить объекты но голову до сих пор ломаю как!?, помогите ..
function Update () { // Ctrl was pressed, launch a projectile if (Input.GetKeyDown(KeyCode.F1)) { // Instantiate the projectile at the position and rotation of this transform var clone : GameObject; clone = Instantiate(projectile, transform.position, transform.rotation);
// Set the missiles timeout destructor to 5 clone.timeoutDestructor = 5;
} if (Input.GetKeyDown(KeyCode.F2)) { // Instantiate the projectile at the position and rotation of this transform var clone1 : GameObject; clone1 = Instantiate(projectile1, transform.position, transform.rotation);
// Set the missiles timeout destructor to 5 clone1.timeoutDestructor = 5;
} if (Input.GetKeyDown(KeyCode.F3)) { // Instantiate the projectile at the position and rotation of this transform var clone2 : GameObject; clone2 = Instantiate(projectile2, transform.position, transform.rotation);
// Set the missiles timeout destructor to 5 clone2.timeoutDestructor = 5;