Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 marcuslind90 · May 05, 2016 at 04:34 PM · performanceprocedural meshprocedural generation

Many objects slow down Unity Scene View

I'm making a strategy game similar to Hearts of Iron or Europa Universalis. The map is split up into provinces, each province is created by procedural generation where the app reads a Color map of the world, and then generates meshes for each province.

When each province's mesh is created, it Instantiates a "Province" prefab and adds the Mesh to it. Each province and mesh becomes its own game object. The reason I do this is because I want each province to have its own attributes and functions.

In the end game, I want to be able to have 750 - 1200 provinces. But currently even with only ~150 provinces or so, my Unity becomes incredibly slow and if I select a Mesh in Scene View, it takes many seconds before the mesh actually get selected. Sometimes Unity crashes.

It seems as if it's mostly the Unity Application, Scene View and Inspector that gets slow. Not the game itself within the "Game" window. The game have good framerate.

So... What am I doing wrong? Is it bad practise to have many Game Objects in Unity? Is it because I do Procedural Generation and for that reason everything is kept in Memory or something like that?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by FortisVenaliter · May 05, 2016 at 07:02 PM

Well, two things to try:

  1. Try building the game. Is the slowdown still present? If not, then there's no problem ^^

  2. Otherwise, try opening the profiler window and see what it is that's actually causing the slowdown, then address the issue specifically.

Comment
Add comment · Show 2 · Share
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 marcuslind90 · May 06, 2016 at 01:25 AM 0
Share

Both your advice is how to make the compiled, rendered GA$$anonymous$$E faster. However I specifically state that there's nothing wrong with the performance of the game itself. The problem is the Unity Editor, Scene View and so on that becomes super slow.

Profiler only show the data used in the rendered Game view from what I know.

The game has about 130+ FPS. No issues. But I can't work with the game if Unity crashes, or Unity takes 5-10 seconds to select an object.

avatar image tanoshimi marcuslind90 · May 06, 2016 at 06:13 AM 0
Share

Profiling while running in the editor will show you the resources used and ti$$anonymous$$gs of different functions when running in the editor, but won't help explain why scene view is slow.

1200 game objects is not in itself a problem, but it's what those game objects are doing - how complex their meshes/materials are etc. Do you have any scripts set to [ExecuteInEdit$$anonymous$$ode] ? Please give us more information about your scene, or any details given in the crash report.

avatar image
0

Answer by NightAvail · May 06, 2016 at 09:08 AM

My advice, don't use the editor at all... It's kinda useless for the type of game you're trying to create. In fact, the editor is not meant for dynamic content. Here are also some steps I had to take to achieve being able to load in any CK2 map without issues

http://forum.unity3d.com/threads/godus-like-procedural-terrain-generation.395034/#post-2578929

Comment
Add comment · Show 1 · Share
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 NightAvail · May 06, 2016 at 12:08 PM 0
Share

I should clarify this too. You'd of course like to use the editor for assets from the store you may purchase, or for testing out your heightmap/shaders, I just don't think it would be helpful for the dynamic (not static) generation process of the provinces. Of course, that's just my opinion. :)

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to create voxel-based procedural terrain 1 Answer

DOTS Grid-based generation question. 1 Answer

Procedural Mesh From Random List Of Veritces 2 Answers

How to fill out a procedurally generated mesh with quads of varying sizes? 0 Answers

How to render procedurally generated mesh to be rendered as 2 sided? 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