Shader Graph Key To Node
Foundation package allows to use node shorcut in hacky-style.
kr.seonghwan.shadergraph-key2node 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/shadergraph-key2node.git README Markdown
Copy this to your project's README.md
## Installation
Add **Shader Graph Key To Node** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/shadergraph-key2node.git
```
[](https://www.pkglnk.dev/pkg/shadergraph-key2node)README
ShaderGraph Key2Node
Simple shortcut system into unity shader graph without modifying package by hacking style.
Reference - Unity Forum Thread by DigitalSalmon.
Installation
way 1. unity-package
this repo can be imported as open unity package.
add https://github.com/seonghwan-dev/shadergraph-key2node.git in package manager.
way 2. npmjs
in Packages/manifest.json ...
{
"dependencies": {
"kr.seonghwan.shadergraph-key2node": "1.0.0"
}
}
{
"scopedRegistries": [
{
"name": "NPM",
"url": "https://registry.npmjs.org",
"scopes": [
"kr.seonghwan"
]
}
]
}
Uninstallation
use menuitem Tools/ShaderGraph Key2Node/Clean Uninstall
Trouble shooting
run menuitem Tools/ShaderGraph Key2Node/Force Resolve
Why should I use in this way?
You don't have to. this is an expedient to avoid modifying the Shader Graph packge in every project. We can mofidy the original package caches in appdata, but it's local way so its not fit. I tried to implement this feature without editing original package by hooking several functions in loaded assembly on unity editor but it requires lots of things to consider.
How this works?
- script installs static delegates at the source file in
ProjectRoot/Library/PackageCache/com.unity.shadergraph@x.x.x/editor/drawing/views/grapheditorview.cs - add callbacks to installed delegate when domain reloaded. (
[InitializedOnLoad]) - when constructor of grapheditorview is called, installed delegates invoked.
Warning
- takes more time after compilation because of InitializeOnLoad
- takes more time in starting unity editor because of installing delegates and callbacks every unity editor instance.
No comments yet. Be the first!