unityzgy/.svn/pristine/f5/f5b8fbbd3681816222b0cdd8bf2f7a9363dd9581.svn-base
ayuan9957 bf12e02276 feat: 多语言本地化系统 - 支持中/英/法/俄实时切换
- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg)
- LoginPanel: InputField placeholder本地化、字体颜色保持
- HistoryPanel: 用时数据本地化、placeholder本地化
- RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建)
- AppraiseWindowBase: 评价等级本地化、操作消息重建
- EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized
- StudentOperateRecorder: 新增InjectOperateMsgLocalized方法
- LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选
- 字体切换时保留颜色和verticalOverflow
2026-07-16 10:05:59 +08:00

76 lines
2.8 KiB
Plaintext

using System;
using UnityEditor;
using UnityEngine;
namespace UnityStandardAssets.ImageEffects
{
[CustomEditor(typeof (Antialiasing))]
public class AntialiasingEditor : Editor
{
private SerializedObject serObj;
private SerializedProperty mode;
private SerializedProperty showGeneratedNormals;
private SerializedProperty offsetScale;
private SerializedProperty blurRadius;
private SerializedProperty dlaaSharp;
private SerializedProperty edgeThresholdMin;
private SerializedProperty edgeThreshold;
private SerializedProperty edgeSharpness;
private void OnEnable()
{
serObj = new SerializedObject(target);
mode = serObj.FindProperty("mode");
showGeneratedNormals = serObj.FindProperty("showGeneratedNormals");
offsetScale = serObj.FindProperty("offsetScale");
blurRadius = serObj.FindProperty("blurRadius");
dlaaSharp = serObj.FindProperty("dlaaSharp");
edgeThresholdMin = serObj.FindProperty("edgeThresholdMin");
edgeThreshold = serObj.FindProperty("edgeThreshold");
edgeSharpness = serObj.FindProperty("edgeSharpness");
}
public override void OnInspectorGUI()
{
serObj.Update();
GUILayout.Label("Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel);
EditorGUILayout.PropertyField(mode, new GUIContent("Technique"));
Material mat = (target as Antialiasing).CurrentAAMaterial();
if (null == mat && (target as Antialiasing).enabled)
{
EditorGUILayout.HelpBox("This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning);
}
if (mode.enumValueIndex == (int) AAMode.NFAA)
{
EditorGUILayout.PropertyField(offsetScale, new GUIContent("Edge Detect Ofs"));
EditorGUILayout.PropertyField(blurRadius, new GUIContent("Blur Radius"));
EditorGUILayout.PropertyField(showGeneratedNormals, new GUIContent("Show Normals"));
}
else if (mode.enumValueIndex == (int) AAMode.DLAA)
{
EditorGUILayout.PropertyField(dlaaSharp, new GUIContent("Sharp"));
}
else if (mode.enumValueIndex == (int) AAMode.FXAA3Console)
{
EditorGUILayout.PropertyField(edgeThresholdMin, new GUIContent("Edge Min Threshhold"));
EditorGUILayout.PropertyField(edgeThreshold, new GUIContent("Edge Threshhold"));
EditorGUILayout.PropertyField(edgeSharpness, new GUIContent("Edge Sharpness"));
}
serObj.ApplyModifiedProperties();
}
}
}