Search Unity

(GraphView) Readonly mode?

Discussion in 'UI Toolkit' started by Kichang-Kim, Jul 4, 2019.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Hi, I'm working on in-house visual scripting system by using GraphView API.

    The basic features like node creation, serialization, copy/paste, undo and etc are done with cool sample (yes, ShaderGraph).

    My next step is "runtime debugging" feature, and it needs that read-only mode of GraphView for preventing modification of the graph in runtime.

    So my question is, is there any features/API for read-only mode GraphView?

    Thanks.
     
  2. jonathanma_unity

    jonathanma_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    229
    Hi Kichang-Kim,

    There is no single switch in GraphView to make it read only.
    You can try to remove the Movable and Deletable capability to nodes, so the user won't be able to move them around and/or delete them.