unity-technologies3.8K installs
Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.
Install
npx skills add https://github.com/unity-technologies/skills --skill shader-graph-create-custom-nodeSKILL.md
Generating a custom Shader Graph node
Step 1: Generate an HLSL function definition
- The function must be preceded by the preprocessor define
UNITY_EXPORT_REFLECTION
Step 2: Decorate with Shader Graph hint tags
- See
resources/all_hints.hlslfor all valid hint tags and usage patterns - C#-style documentation tags are supported outside of
funchintsorparamhintsblocks - Required function hints:
sg:ProviderKeysg:SearchCategorysg:SearchTermssg:DisplayName
Step 3: Write the code to an asset
- Search the project for a
ShaderIncludeasset (.hlsl) that already contains custom Shader Graph nodes - If a matching asset exists, show the user its current contents and ask for confirmation before appending the new code
- If no matching asset exists, create a new
.hlslasset - Ensure the file begins with
#include "ShaderApiReflectionSupport.hlsl"
Related skills
unity-cliunity-technologies6.3KControls the Unity Editor and projects from the command line, driving a running Editor to edit scenes and assets or run C#. Use when asked to install or manage Editors, licenses, or projects, set up version control, build, test, configure the Unity MCP server, or run any unity command.unity-package-managementunity-technologies5.3KAdds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor. Use for headless or CI package installs, verifying package IDs and versions, or choosing which packages a game needs. The Unity CLI doesn't manage packages.new-unity-projectunity-technologies4.6KGuides creating a new Unity project, gathering concept, platforms, and monetization before setting up the project, source control, and packages. Use when the user asks to start a new game or prototype.ui-uguiunity-technologies4.4KUnderstands, edits, and generates Unity uGUI Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or prefab UI files.