Folder clean up;

Added Emissive;
This commit is contained in:
Misaki
2025-01-29 12:27:09 +09:00
parent 1a82022a6f
commit 018300e046
81 changed files with 120 additions and 399 deletions

View File

@@ -0,0 +1,71 @@
using System.Collections.Generic;
using UnityEngine.Rendering;
namespace Misaki.HdrpToon
{
public static class UTSDebugPanel
{
static bool isPanelEnabled = false;
static UTS_BSDFDebug uTS_BSDFData = UTS_BSDFDebug.None;
static UTS_LightingDebug uTS_LightingData = UTS_LightingDebug.None;
public static void OnEnable()
{
if (isPanelEnabled)
return;
// Create a list of widgets
List<DebugUI.Widget> widgetList = new List<DebugUI.Widget>();
// Add a checkbox widget to the list of widgets
widgetList.AddRange(new DebugUI.Widget[]
{
new DebugUI.EnumField
{
displayName = "BSDF debug mode",
tooltip = "Select a bsdf debug mode",
getter = () => (int)uTS_BSDFData,
setter = value => uTS_BSDFData = (UTS_BSDFDebug)value,
getIndex = () => (int)uTS_BSDFData,
setIndex = value => uTS_BSDFData = (UTS_BSDFDebug)value,
autoEnum = typeof(UTS_BSDFDebug), onValueChanged = BSDFDebugChanged
},
new DebugUI.EnumField
{
displayName = "Lighting debug mode",
tooltip = "Select a lighting debug mode",
getter = () => (int)uTS_LightingData,
setter = value => uTS_LightingData = (UTS_LightingDebug)value,
getIndex = () => (int)uTS_LightingData,
setIndex = value => uTS_LightingData = (UTS_LightingDebug)value,
autoEnum = typeof(UTS_LightingDebug), onValueChanged = LightingDebugChanged
},
});
// Create a new panel (tab) in the Rendering Debugger
DebugUI.Panel panel = DebugManager.instance.GetPanel("UTS", createIfNull: true);
// Add the widgets to the panel
panel.children.Add(widgetList.ToArray());
isPanelEnabled = true;
}
private static void BSDFDebugChanged(DebugUI.Field<int> field, int arg2)
{
}
private static void LightingDebugChanged(DebugUI.Field<int> field, int arg2)
{
}
// Remove the custom panel if the GameObject is disabled
public static void OnDisable()
{
DebugManager.instance.RemovePanel("UTS");
isPanelEnabled = false;
}
}
}