• 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 /
  • Help Room /
avatar image
0
Question by bahui80 · Jun 28, 2016 at 04:53 AM · performancesizeobjectslaggraph

Create a big graph in Unity

Hi, I have a task to achieve and I am having some problems with the performance.

I have to make a graph (by graph I mean nodes and edges) to be drawn on Unity so that I can move over it to see it. The edges and the nodes are both 2d.

I have an Xml where I read all the information of the graph. The xml can contain the following elements:

< circle cx="19.818" cy="-8.4833" color="rgb(148,36,179)" radius="0.0497241" />

< line x1="21.5083" x2="18.157" y1="-1.4545" y2="-1.22787" color="rgb(89,89,0)" width="0.00994481" />

So, as soon as the unity program loads, I read this xml and parse it to create the nodes and edges. I have a prefab of a node and a prefab of a line. This ones are made by creating an empty object and using unity to draw them.

So I only have two types of prefabs: nodes and lines.

As soon as I go parsing the xml, I go creating a new instance of the prefab depending if it is a line or a circle. This part is working perfect and the graph is drawing perfect and I can move around it to see it.

The problem that I have is that the graphs are HUGE. I have a medium graph and it has 50000 nodes and 110000 lines. So, in total we have 160000 objects. When we are seeing only a part of the graph on the camera it works fine, but when I make a zoom out and I see the whole graph I get lag. And this is a medium graph, I can have graphs that are even bigger than this one.

So my question is, is there a way to solve the problem of the lag when I see the whole graph? Or with so many items in Unity is impossible? Although there are so many items, they are very simple items.

Thanks

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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

76 People are following this question.

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

Related Questions

FBX Inspector Speed + Mask Definition 0 Answers

FPS drop beacause Dialog with 200 images in it 0 Answers

Really High CPU usage On empty scenes/new projects (ApplicationTickTimer problem) profiler pics 0 Answers

Gfx.WaitForPresent rant, and editor fix 0 Answers

Lags while camera movement (gfx.waitforpresent) 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges