Can't instantiate different objects

Hello,
I’m trying to instantiate different prefabs at once. But couldn’t figure out how. I tried to use Random.Range method but didn’t worked for me. It instantiates only one of the prefabs. I want it to instantiate all of the prefabs.

Hi,

What do you mean by “at once”? One Instantiate call instantiates one object. If you want to instantiate multiple objects, use a for-loop.

Did this help?


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms