阶段性完成

This commit is contained in:
SoulliesOfficial
2025-12-08 05:27:53 -05:00
parent ef7b479712
commit f7af60351b
8770 changed files with 15637030 additions and 208354 deletions

View File

@@ -0,0 +1,39 @@
// Copyright (c) Le Loc Tai <leloctai.com> . All rights reserved. Do not redistribute.
using System;
using UnityEditor;
using UnityEngine;
namespace LeTai.Asset.TranslucentImage.Editor
{
public static class MaterialEditorGUI
{
internal static float Slider(string label, float value, float left, float right)
{
var labelWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 0;
var newValue = EditorGUILayout.Slider(label, value, left, right);
EditorGUIUtility.labelWidth = labelWidth;
return newValue;
}
public class PropertyScope : GUI.Scope
{
public bool Changed => _changeScope.changed;
private readonly EditorGUI.ChangeCheckScope _changeScope;
public PropertyScope(MaterialProperty prop)
{
_changeScope = new EditorGUI.ChangeCheckScope();
EditorGUI.showMixedValue = prop.hasMixedValue;
}
protected override void CloseScope()
{
EditorGUI.showMixedValue = false;
_changeScope.Dispose();
}
}
}
}