- Unity 6.2 → 6.3 업그레이드 - Beautify URP 에셋 업데이트 - Stylized Water 3 에셋 제거 - PIDI Planar Reflections shadergraph 업데이트 - 각종 메타파일 및 에셋 파일 Unity 6.3 호환 업데이트 - lilToon, AmplifyShaderEditor 등 외부 에셋 설정 변경 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
112 lines
4.5 KiB
C#
112 lines
4.5 KiB
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEngine.Rendering;
|
|
using UnityEngine.Rendering.Universal;
|
|
|
|
namespace Beautify.Universal {
|
|
|
|
[CustomEditor(typeof(BeautifyRendererFeature))]
|
|
public class BeautifyRenderFeatureEditor : Editor {
|
|
|
|
SerializedProperty renderPassEvent, ignorePostProcessingOption;
|
|
#if ENABLE_VR && ENABLE_XR_MODULE
|
|
SerializedProperty clearXRColorBuffer;
|
|
#endif
|
|
SerializedProperty cameraLayerMask;
|
|
SerializedProperty stripSettings;
|
|
|
|
Editor internalStripSettingsEditor;
|
|
|
|
void OnEnable () {
|
|
renderPassEvent = serializedObject.FindProperty("renderPassEvent");
|
|
ignorePostProcessingOption = serializedObject.FindProperty("ignorePostProcessingOption");
|
|
#if ENABLE_VR && ENABLE_XR_MODULE
|
|
clearXRColorBuffer = serializedObject.FindProperty("clearXRColorBuffer");
|
|
#endif
|
|
cameraLayerMask = serializedObject.FindProperty("cameraLayerMask");
|
|
stripSettings = serializedObject.FindProperty("stripSettings");
|
|
}
|
|
|
|
public override void OnInspectorGUI () {
|
|
|
|
serializedObject.Update();
|
|
|
|
EditorGUILayout.PropertyField(renderPassEvent);
|
|
EditorGUILayout.PropertyField(ignorePostProcessingOption);
|
|
#if ENABLE_VR && ENABLE_XR_MODULE
|
|
EditorGUILayout.PropertyField(clearXRColorBuffer);
|
|
#endif
|
|
EditorGUILayout.PropertyField(cameraLayerMask);
|
|
|
|
BeautifyRendererFeature feature = (BeautifyRendererFeature)target;
|
|
if (stripSettings.objectReferenceValue == null) {
|
|
feature.UpdateInternalStripSettings();
|
|
}
|
|
BeautifyStripSettings currentSettings = feature.settings;
|
|
|
|
EditorGUILayout.Space(10);
|
|
EditorGUILayout.LabelField("Beautify Shader Features Stripping", EditorStyles.boldLabel);
|
|
EditorGUILayout.HelpBox("Optimize shader compilation time by stripping unused Beautify features. Select the features you wish to exclude from the build.", MessageType.Info);
|
|
EditorGUILayout.BeginHorizontal();
|
|
EditorGUILayout.PropertyField(stripSettings);
|
|
if (GUILayout.Button("Create Config Asset", GUILayout.Width(150))) {
|
|
CreateConfigAsset(feature, currentSettings);
|
|
GUIUtility.ExitGUI();
|
|
return;
|
|
}
|
|
EditorGUILayout.EndHorizontal();
|
|
|
|
if (currentSettings != null) {
|
|
Editor.CreateCachedEditor(currentSettings, typeof(BeautifyStripSettingsEditor), ref internalStripSettingsEditor);
|
|
|
|
EditorGUI.BeginChangeCheck();
|
|
internalStripSettingsEditor.OnInspectorGUI();
|
|
if (EditorGUI.EndChangeCheck()) {
|
|
if (stripSettings.objectReferenceValue == null) {
|
|
Undo.RecordObject(feature, "Change Strip Settings");
|
|
feature.SyncInternalToLegacy();
|
|
EditorUtility.SetDirty(feature);
|
|
}
|
|
}
|
|
}
|
|
|
|
EditorGUILayout.Separator();
|
|
|
|
if (GUILayout.Button("Select Beautify Volume >")) {
|
|
#if UNITY_2023_1_OR_NEWER
|
|
var volumes = FindObjectsByType<Volume>(FindObjectsSortMode.None);
|
|
#else
|
|
var volumes = FindObjectsOfType<Volume>();
|
|
#endif
|
|
|
|
foreach (var volume in volumes) {
|
|
if (volume.sharedProfile != null && volume.sharedProfile.TryGet<Beautify>(out var beautify)) {
|
|
Selection.activeObject = volume.gameObject;
|
|
EditorGUIUtility.PingObject(volume.gameObject);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
|
|
void CreateConfigAsset (BeautifyRendererFeature feature, BeautifyStripSettings source) {
|
|
string path = EditorUtility.SaveFilePanelInProject("Create Strip Settings", "BeautifyStripSettings", "asset", "Please enter a file name to save the strip settings to");
|
|
if (string.IsNullOrEmpty(path)) return;
|
|
|
|
BeautifyStripSettings newSettings = ScriptableObject.CreateInstance<BeautifyStripSettings>();
|
|
// Copy values
|
|
EditorUtility.CopySerialized(source, newSettings);
|
|
|
|
AssetDatabase.CreateAsset(newSettings, path);
|
|
AssetDatabase.SaveAssets();
|
|
AssetDatabase.Refresh();
|
|
|
|
feature.stripSettings = newSettings;
|
|
EditorUtility.SetDirty(feature);
|
|
serializedObject.Update();
|
|
}
|
|
}
|
|
}
|