Change .shadergraph file manualy

Hi @ahmaderfani12 ,

Short answer: no. Graph building APIs are all internal.
I’ve added a card on product portal, please share feedback as to what you’d like to do with this and how you’d see it work.

You can also check out the work on Block Shaders for a modular way of authoring shaders, but this is early stage.

Now, if you are curious and/or highly motivated…
Disclaimer: I do not recommend this, and share information for the sole purpose of research.

You can use an Assembly Definition Reference, make it point to Unity.ShaderGraph.Editor, and in the same folder put an AssemblyInfo.cs with

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Your.Other.Assembly")]

This will let you access internals without forking the package, but keep in mind that internals are subject to change without notice.
From there, you can look at how graphs are being created in ShaderGraph/Editor/AssetCallbacks.

2 Likes