Creating a software for drawing diagrams

Hello there people of Unity! :slight_smile:

I want to make a software like yEd Graph Editor (although much simpler) with Unity3D so I want to ask you two questions regarding that:

1.How efficient and smart would it be to choose Unity for such a software? (personally I chose Unity because I wanted to be able to have big diagrams with thousands of nodes and still get a decent performance, and also because I wanted to learn unity at the same time - two birds with one shot)

2.Could you please give me just an initial idea or push in a right direction regarding how to start making such a software in Unity3D?
I cannot make my mind about whether I should use UI elements for representing the diagram nodes, or should I simply use sprites with text labels over them…or perhaps 3D planes?
What approach would be better performance wise and feature wise?

Feel free to write anything you think may be important for me, I would really appreciate any help and any additional tip or advice!!

IMO, using Unity for that sounds like a pretty terrible idea. Unity is a game engine; it has features optimised for making games such as AI pathfinding, 3D audio, lightmapping, physics, PBR, joystick input, network matchmaking…

…your application won’t make use of any of those features, but it will still be bloated by having to include the necessary libraries for them. And you won’t learn much about using Unity either because you won’t touch on any of those features. Unity probably could perform the task you’re asking about, but it’s certainly not optimised to get “decent performance” with thousands of static UI elements.

If you want to make a windows application, use WPF/Windows Forms. If you want to make a game, use Unity.

Clearly, I would not advise Unity at all for this kind of software :

  1. Unity has good performances for what it’s intended to do : create games. Otherwise, many functionnalities you won’t use will still be in action (rendering, physics, …)
  2. Unity doesn’t offer nice 2D primitives easily. You will have to deal with OpenGL most of the time (which is quite painful)
  3. Other tools exist which are more “powerfull” and will simplify your development to do what you want. Though, some may not be multiplatform (Winforms : C# / Visual Basci ; Qt : C++. Last but not least : web languages : JavaScript especially.
  1. I am going to go against the grain
    here and say Unity could
    be a decent choice. It really
    depends on how your project evolves
    over time. People use Unity all the
    time to make things other than
    games. Unity is also indeed optimized to handle drawing thousands of rectangles. It also could prove useful later on to have access to 2D physics for collisions or a location based audio system. Your final program will be little larger than using something that only handles UI, but as for runtime performance I personally do not believe you will be paying(that much) for all the other features Unity has unless you use them. So if you really want to try it out no harm there. You already mentioned wanting to learn Unity so even if you decide to migrate to another platform in the future it is not really any time wasted.

  2. If I were to make an application like you are describing I would go with Unity’s built in UI system. It is easy to use both in and out of scripts and has tons of features packed in that can help you get your project going quickly.

Hi @Vegeta_DTX, I am in a kind of same situation as you: use Unity to create an diagram, advance note taking, with Unity. After some research, i decide to give a go with Unity.

TextMesh Pro is a good tool for that purpose.

… Would discuses more if you want.

Btw, there a app call https://www.diagrams.net/, is open source. It is pretty interesting. I downloaded the source code, have tried to make some change in the code, just for testing if I installed everything correctly, but not 100% successful …

That app, make me say to myself “Am I reinventing the wheel” !?, “Should I learn the code of that app, then modify it to have features I want”, etc.

For now, I decide to keep going with what I have done with Unity, knowing that Unity can do what I want (vs the diagrams.net app which I am not sure if is possible).