Tool #2
Unity Update CGInclude is an external Windows application exe to handle updates for Unity Standard Render Pipeline cginc Files.
The tool is able to update the Standard Render Pipeline cginc files in the \Editor\Data\CGIncludes folder automatically.
New shader code can be inserted and replaced with a small script language no matter what version of Unity you use.
The user-script contains a handful commands to control the complete update process easily. The benefit of this external editor is to update changes of your Unity cginc version between different Unity versions.
Why?
For example: If you work with the Unity version 2017.3 and you changed code in the cginc shader files, than any changes can cause errors in later versions of Unity. Simply because the code is permanently changed by the brew crew.
If you select a new Unity version the tool download the corresponding builtin_shaders and install them for restore.
The tool is available soon.
Script commands:
>File1 Filename.cginc // … cginc file to edit
>FileEnd
Example for find and insert:
>Find // … find any text line
>Insert // … insert text line
>FindEnd
Example for Function find and insert:
>Function[X] // … find a function [optional numbering value)
>Find // … find a text line
>CommandOut // … comment text line out
>Insert // … insert at find position
>FunctionEnd
Questions:
**How can I pass my changes to another Unity version?**
[/SIZE]
Select a new Unity Version. Load your script file. Click [Compile and Write]. Done.
[/COLOR][/COLOR][/SIZE]
**What happen if the tool does not find a function in the cginc file?**
[/COLOR][/COLOR][/SIZE]
The tool lists errors while processing the script file. Also when missing properties or other errors in >find or >Insert as well.
[/COLOR][/COLOR][/SIZE]

[/COLOR][/COLOR][/SIZE]

[/COLOR][/COLOR][/SIZE]
**Do I need one script file for each cginc file?**
[/COLOR][/COLOR][/SIZE]
No. You can add so many cginc files in one script as you like. A complete project is possible to process with one script file.
[/COLOR][/COLOR][/SIZE]
**>File1 Filename.cginc // ... cginc file to edit**
[/COLOR]
**>FileEnd**
What’s the difference between >Find and >Function?[/COLOR][/SIZE]
>Find will find any line in the cginc file and process it. >Function process only functions with the given function name.
[/COLOR][/COLOR][/SIZE]