Jump to content
  • Advertisement
dell96

Spawning

Recommended Posts

Advertisement

You may want to ask questions like these on the Unity Answers site or their forums. Also, I'd recommend quoting the text directly in your posts as it is generally considered unwise to open program files you don't know the contents of on your computer and people will be less likely to read them and assist with your issue.

Share this post


Link to post
Share on other sites

I did not check the code but what your doing is very simple.

You spawn object in Unity with:

Instantiate(TheObject, Position, Rotation);

https://docs.unity3d.com/Manual/InstantiatingPrefabs.html

 

Most of the time you will want to parent it to some kind of object so that you can remove all the child objects at once. I helped somone with a similar code:

It's 2D but has a spawn code inside: https://www.gamedev.net/applications/core/interface/file/attachment.php?id=40264

 

Can you describe your problem in more detail? Sorry I don't have the time to try your code as I am at work.

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites

well in my game my objects spawn correctly but when the player hit the objects the spawning stop, and the gameover page shows with the replay button on the bottom when i hit the button the spawning objects don't restart they just stay where they were.but i want to spawn the objects again, like flappy bird if you die you hit the restart button and its starts spawning again  

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!