Search Unity

Trying to make a node editor with Unity GUI but it's slow

Discussion in 'UGUI & TextMesh Pro' started by Kranchy, Mar 3, 2019.

  1. Kranchy

    Kranchy

    Joined:
    Jul 24, 2017
    Posts:
    3
    Hello, as the title says, I'm currently trying to create an node editor for my game, and since we aim to allow the player to use it, it needs to be ingame.

    I successfully made it and it works very fine with a few nodes but with one of my complete levels (20 node editors and the first one has 50 nodes), it takes forever to display the first editor. The nodes are already instanciated so it's just about turning on the Game Object containing the Ui, and the profiling tool informs me that it comes from "Layout'.

    Currently I have a canvas that contains all node editors (only one is active at a time), but I tried to set up one canvas per node editor, and even one canvas per node, but it doesn't seem to change anything much. I also trying to disable all vertical and horizontal layouts, since I heard it can be expensive.

    My question is, in your opinion, what are the best practices in terms of canvas to make a node editor with Unity GUI ?