| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | //// ShaderGraphEssentials for Unity// (c) 2019 PH Graphics// Source code may be used and modified for personal or commercial projects.// Source code may NOT be redistributed or sold.// // *** A NOTE ABOUT PIRACY ***// // If you got this asset from a pirate site, please consider buying it from the Unity asset store. This asset is only legally available from the Unity Asset Store.// // I'm a single indie dev supporting my family by spending hundreds and thousands of hours on this and other assets. It's very offensive, rude and just plain evil to steal when I (and many others) put so much hard work into the software.// // Thank you.//// *** END NOTE ABOUT PIRACY ***//using UnityEngine;using UnityEditor;using System;namespace ShaderGraphEssentials{    public class SGEUnlitShader : ShaderGUI{    public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)    {        // render the default gui        //base.OnGUI(materialEditor, properties);                var cullingProp = FindProperty("_MyValue", properties);                GUIContent queueSlider = new GUIContent("My Custom Value",        "Determines the chronological rendering order for a Material. High values are rendered first.");                EditorGUI.BeginChangeCheck();        int culling = EditorGUILayout.IntSlider(queueSlider, (int) cullingProp.floatValue, 0, 2);        if (EditorGUI.EndChangeCheck())            cullingProp.floatValue = culling;    }}}
 |