Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jonesa01 · May 28, 2012 at 05:21 PM · crashprefabs

Unity Crashes with too many prefabs

Hello,

I am developing a game in unity which involves me making a terrain out of blocks and other objects, however if I ever make the game over around 500x500 which involves instansiating around 250,000 prefabs Unity crashes. If I do 500x500 and instansiate different prefabs in a differnt loop directly after this it works fine.

Is there anyway to stop this from happening or is there a limit to the number of prefabs?

Thanks,

Adam

Comment
Add comment · Show 10
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image You! · May 28, 2012 at 05:43 PM 0
Share

Are you instantiating all of these through scripting? If you are, that would cause the crash, and you may want some of these objects put into the scene manually.

avatar image jonesa01 · May 28, 2012 at 06:00 PM 0
Share

I am because the terrain is randomly generated at game load so there was no option to put them in manually.

avatar image hijinxbassist · May 28, 2012 at 06:06 PM 0
Share

Are you storing the prefabs in memory, like adding them into an array? $$anonymous$$ight be memory related. Can you see all the prefabs at a given time? You might want to remove prefabs as you go to keep it clean

avatar image whydoidoit · May 28, 2012 at 07:44 PM 1
Share

I suggest you have the $$anonymous$$i map look at something else that's smaller - that's going to be a lot of drawing for a map - potentially very slow. As you are procedurally creating your world could you also procedurally create something for the $$anonymous$$imap?

avatar image jonesa01 · May 29, 2012 at 01:38 PM 1
Share

Right I think I have solved the problem with the $$anonymous$$imap. I have created another scene which has a terrain (fixed size), I will then instansiate cubes to act as the models (to scale). Then positioned a camera directly looking down on it and set the Y value to be negative so the terrain will be underneath everything else. I then load the $$anonymous$$imap scene by using Application.LoadLevelAdditive. This means I will have exactly what I wanted a 3d landscape which will render as required and a low resolution 2d $$anonymous$$imap.

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Prefabs Empty After Crash 2 Answers

Installing Unity 3D 4.3.4 on Windows 8.1 2 Answers

Crash app unity 4.5.5f1 on nexus 7 (Android 4.4.4) 0 Answers

Instantiate prefab 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges