{"id":13661917,"url":"https://github.com/nicloay/Node-Inspector","last_synced_at":"2025-04-25T06:30:45.185Z","repository":{"id":146479365,"uuid":"51924309","full_name":"nicloay/Node-Inspector","owner":"nicloay","description":"Unity graph editor extension. ","archived":false,"fork":false,"pushed_at":"2016-06-14T05:33:51.000Z","size":172,"stargazers_count":138,"open_issues_count":8,"forks_count":30,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-10T17:45:19.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicloay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-02-17T13:26:03.000Z","updated_at":"2024-03-09T03:02:04.000Z","dependencies_parsed_at":"2023-07-15T08:33:41.201Z","dependency_job_id":null,"html_url":"https://github.com/nicloay/Node-Inspector","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicloay%2FNode-Inspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicloay%2FNode-Inspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicloay%2FNode-Inspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicloay%2FNode-Inspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicloay","download_url":"https://codeload.github.com/nicloay/Node-Inspector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250767008,"owners_count":21483905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:01:44.282Z","updated_at":"2025-04-25T06:30:43.186Z","avatar_url":"https://github.com/nicloay.png","language":"C#","funding_links":[],"categories":["C\\#","Game Development"],"sub_categories":["Unity Engine: Resources"],"readme":"#NodeInspector\nIf you like to use scriptable object as config files you probably know how hard is maintain references from one object to another. This project would help you to organize your objects.\n\nthis is what you will get at the end of this simple tutorial \n\n![Simple nodes](https://cloud.githubusercontent.com/assets/1671030/13919456/ff03db6e-ef86-11e5-93e2-e9dcf3c753e1.png)\n\n#Graph\nGraph is a set of nodes connected by references. In our case we have **ScriptableObject** as a graph nodes.\nTo start work what we need is  to define Graph scriptable object which will keep links to all nodes. and all nodes just need to be inherited from **ScriptableObjectNode** class. If you open this class you will find that it just have one more property WindowRect. this property used in inspector to store information about node position.\n\nIt's possible that you want to store information about start node you can use it as well using directives. so let's start implement this\n\n#MyConfig.cs\nI'll create test class which will keep some properties and have a link to another object.\n\n```C#\nusing UnityEngine;\nusing NodeInspector;\n\n[NodeMenuItem(\"MyConfigNode\")] //This directive create option menu in the inspector\n[OneWay]       // If you won't provide this attribute you won't be abble to link to this instance as inputnode\npublic class MyConfigNode : ScriptableObjectNode {\n    [OneWay]  //next property will have output link to another node\n    public MyConfigNode LinkToNode;\n    public int          TestInt;\n    public LayerMask    TestLayerMask;\n    [OneWay]\n    public MyConfigNode LinkToAdditionalNode;\n}\n```\n\nAs you see it's really simple class you just  keep some properties here.\n\n\n#MyConfigNodeHolder\n```C#\nusing UnityEngine;\nusing System.Collections.Generic;\nusing NodeInspector;\n\n[CreateAssetMenu] //This is standard unity feature. Create instance of this object in assets\npublic class MyConfigHolder : ScriptableObject { \n    [Graph(\"StartNode\")] //this is a name of the property of this class\n    public List\u003cMyConfigNode\u003e Nodes;\n\n    public MyConfigNode StartNode; //if you don't need a start node you don't need to use Graph parameter\n}\n```\n\nyou can use several graphs at one scriptable object. but you graph must be a List of ScriptableObjectNode type or classes deprived from it.\n\nSo this is it. now you can create instance of your ConfigHodler object and start work with you graph.\nRight click at your project window and select **Create/My Config Holder** after that you will have just asset in the folder. to start working with it you need to open node inspector it located at the top unity bar **Window/Node Inspector**\n\nAt the top left corner of the inspector you will find menu which create instances of your node. \nThis is it. now you can freely connect your nodes as you wish. and if you want to create some node as start node just use context menu or toplight menu of the nodes.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicloay%2FNode-Inspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicloay%2FNode-Inspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicloay%2FNode-Inspector/lists"}