Clean up custom pass drawer;

This commit is contained in:
Misaki
2024-11-08 18:41:55 +09:00
parent da32fd952d
commit a3c299d7f5
9 changed files with 0 additions and 2359 deletions

View File

@@ -1,45 +0,0 @@
using UnityEditor.Rendering.HighDefinition;
using UnityEngine;
namespace UnityEditor.Rendering.Toon
{
[CustomPassDrawer(typeof(UTSHairShadowPass))]
public class HairShadowPassDrawer : CustomPassDrawer
{
SerializedProperty m_RenderQueueType;
SerializedProperty m_SortingCriteria;
SerializedProperty m_LayerMask;
protected override void Initialize(SerializedProperty customPass)
{
m_RenderQueueType = customPass.FindPropertyRelative("renderQueueType");
m_SortingCriteria = customPass.FindPropertyRelative("sortingCriteria");
m_LayerMask = customPass.FindPropertyRelative("layerMask");
}
protected override void DoPassGUI(SerializedProperty customPass, Rect rect)
{
EditorGUILayout.HelpBox("Eyebrow Passthrough feature in the Toon shader will need this part to function", MessageType.Info);
EditorGUILayout.HelpBox("Please Assign Hair/Eyebrow Renderer respectively as the 1st/2nd element of renderer array", MessageType.Info);
EditorGUI.BeginProperty(rect, new GUIContent("Queue", "Filter the render queue range you want to render."), m_RenderQueueType);
EditorGUI.PropertyField(rect, m_RenderQueueType, new GUIContent("Queue", "Filter the render queue range you want to render."));
EditorGUI.EndProperty();
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(rect, m_SortingCriteria, new GUIContent("Sorting Criteria", "Sorting settings used to render objects in a certain order."));
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(rect, m_LayerMask, new GUIContent("Layer Mask", "Chose the Callback position for this render pass object."));
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
//base.DoPassGUI(customPass, rect);
}
protected override float GetPassHeight(SerializedProperty customPass)
{
return (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) * 3;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8a0dff152af1b39468bd5027f57c0b27
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,41 +0,0 @@
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
using UnityEngine;
namespace Unity.Toonshader.Editor
{
[CustomPassDrawerAttribute(typeof(UTSOutlinePass))]
public class UTSOutlinePassEditor : CustomPassDrawer
{
SerializedProperty m_RenderQueueType;
SerializedProperty m_SortingCriteria;
SerializedProperty m_LayerMask;
protected override void Initialize(SerializedProperty customPass)
{
m_RenderQueueType = customPass.FindPropertyRelative("renderQueueType");
m_SortingCriteria = customPass.FindPropertyRelative("sortingCriteria");
m_LayerMask = customPass.FindPropertyRelative("layerMask");
}
protected override void DoPassGUI(SerializedProperty customPass, Rect rect)
{
EditorGUI.BeginProperty(rect, new GUIContent("Queue", "Filter the render queue range you want to render."), m_RenderQueueType);
EditorGUI.PropertyField(rect, m_RenderQueueType, new GUIContent("Queue", "Filter the render queue range you want to render."));
EditorGUI.EndProperty();
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(rect, m_SortingCriteria, new GUIContent("Sorting Criteria", "Sorting settings used to render objects in a certain order."));
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(rect, m_LayerMask, new GUIContent("Layer Mask", "Chose the Callback position for this render pass object."));
rect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
}
protected override float GetPassHeight(SerializedProperty customPass)
{
return (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) * 3;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6ff30d943d4212043bf0a26bd9bc2eed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: