Bits&Bobs Unity Tutorial - GameObject, Arrays, Instantiate, Prefabs

Bits&Bobs Unity Tutorial - GameObject, Arrays, Instantiate, Prefabs

ThooomBoom

8 лет назад

9,020 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@edgarabasov1793
@edgarabasov1793 - 14.09.2021 12:59

Thank you a lot man!

Ответить
@charlesferry9465
@charlesferry9465 - 27.09.2020 10:51

how to make one by one array obj instantiate clicking button

Ответить
@miladyekani9391
@miladyekani9391 - 15.04.2019 12:15

thanks a lot it was helpful. How about creating new clones from a specific prefab and putting them in one array so that you can access them individually (e.g i want to create coins in my scene and destroy some of them not others ) ? do you have a solution? thanks a gain.

Ответить
@MaximumSpice
@MaximumSpice - 17.01.2019 01:19

thank you very much. Nice and simple, I was making a very small mistake all cleared up.

Ответить
@terrypapamarkou3741
@terrypapamarkou3741 - 13.12.2018 12:29

nice and short which is good but in future no back ground music

Ответить
@nicholaslonnon7509
@nicholaslonnon7509 - 15.10.2018 19:17

is there any way I can mess with the properties of the objects in the array

Ответить
@polherverolland
@polherverolland - 20.09.2018 00:52

music louder than your voice...
Also, I can see that when you make an array, you have to drag and drop the prefab, is there another way to do it? by coding only?

Ответить
@FuzzyDPozzy
@FuzzyDPozzy - 19.09.2018 17:56

Something that helped me just create an empty gameobject and paste this into your script: public GameObject[] cubes;
public int numObjectsToSpawn;

public float PlaceX;
public float PlaceZ;
// Use this for initialization
void Start () {

for (int i = 0; i < numObjectsToSpawn; i++) {
PlaceX = Random.Range (130, 154);
PlaceZ = Random.Range (112, 125);
Instantiate(cubes[i], new Vector3(PlaceX, 1.4f, PlaceZ), Quaternion.identity);
}

}

Ответить