Added translaprent support
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using Misaki.ShaderGUI;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using static Misaki.HdrpToon.UtsShaderPropertyName.Outline;
|
||||
using static Misaki.HdrpToon.UTSPropertyName.Outline;
|
||||
using static UnityEditor.EditorGUI;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
@@ -71,6 +73,14 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
if (Properties.outlineState.GetBooleanValue())
|
||||
{
|
||||
var isTransparentAny = materials.Any(m => m.GetInteger(UTSPropertyName.SurfaceOptions.SURFACE_TYPE) == 1);
|
||||
if (isTransparentAny)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Outline is not supported in transparent mode.", MessageType.Warning);
|
||||
}
|
||||
|
||||
using var settingScope = new DisabledGroupScope(isTransparentAny);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
editor.TexturePropertySingleLine(Styles.outlineWidthText, Properties.outlineWidthMap, Properties.outlineWidth);
|
||||
editor.TexturePropertySingleLine(Styles.outlineColorText, Properties.outlineColorMap, Properties.outlineColor);
|
||||
|
||||
Reference in New Issue
Block a user