Version: Unity 6.4 (6000.4)
Language : English
Implementing a Graph Tool
Implement a graph tool

Set up the code structure

Set up the code structure you need to create a graph tool.

Before you create your own graph tool implementation, you need to set up the code structure. You need to create a folder and an assembly.

This page covers how to set up the code structure only. For information on how to create a graph tool, refer to Implement a graph tool.

Create a folder

Create a folder to store all the scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
. The recommended best practice is that you organize your classes into separate files.

Create an assembly

Create an assembly to start organizing your code. This assembly must specifically target the Unity Editor because Graph Toolkit is meant for Editor use only.

Refer to this example of an assembly:

{
    "name": "Unity.GraphToolkit.Scripts",
    "rootNamespace": "Unity.GraphToolkit.Scripts",
    "references": [
        "Unity.GraphToolkit.Editor",
        "Unity.GraphToolkit.Common.Editor"
    ],
    "includePlatforms": [
        "Editor"
    ]
}

You can find more details on how to create an assembly definition in Organizing scripts into assemblies.

Additional resources

Implementing a Graph Tool
Implement a graph tool
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961