V
V
visgold2018-06-01 11:55:46
Android
visgold, 2018-06-01 11:55:46

Through which script can you reproduce the random respawn of several objects in Unity in the same plane?

In general, the essence is this, you need to force objects to respawn (there will be several of them, so far 6), let's say from -5 to 5 randomly along the x-axis. 2D game. Please tell me the most suitable implementation for this. If you need to know more conditions, for a suitable option, say what conditions are needed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
InFoS, 2018-06-03
@visgold

Instantiate(SomeObject, new Vector3(Random.Range(-5, 5), 1, 1), Quaternion.Identity);
If you have an idea how to code, then this line will do almost everything you need. And then you can make up your own mind about the terms.

N
netrox, 2018-06-01
@netrox

Object Pooling

V
visgold, 2018-06-03
@visgold

Thank you all, I solved the issue with a kuratina.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question