2026-05-20 무기습득
This commit is contained in:
46
Assets/HighlightPlus/Editor/HighlightEffectBlockerEditor.cs
Normal file
46
Assets/HighlightPlus/Editor/HighlightEffectBlockerEditor.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HighlightPlus {
|
||||
|
||||
[CustomEditor(typeof(HighlightEffectBlocker))]
|
||||
public class HighlightEffectBlockerEditor : Editor {
|
||||
|
||||
SerializedProperty include, layerMask, blockOutlineAndGlow, blockOverlay, nameFilter, useRegEx;
|
||||
HighlightEffectBlocker hb;
|
||||
|
||||
void OnEnable() {
|
||||
include = serializedObject.FindProperty("include");
|
||||
layerMask = serializedObject.FindProperty("layerMask");
|
||||
nameFilter = serializedObject.FindProperty("nameFilter");
|
||||
useRegEx = serializedObject.FindProperty("useRegEx");
|
||||
blockOutlineAndGlow = serializedObject.FindProperty("blockOutlineAndGlow");
|
||||
blockOverlay = serializedObject.FindProperty("blockOverlay");
|
||||
hb = (HighlightEffectBlocker)target;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUILayout.PropertyField(include);
|
||||
if (include.intValue == (int)BlockerTargetOptions.LayerInChildren) {
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(layerMask);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
if (include.intValue != (int)BlockerTargetOptions.OnlyThisObject) {
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(nameFilter, new GUIContent("Object Name Filter"));
|
||||
EditorGUILayout.PropertyField(useRegEx, new GUIContent("Use Regular Expressions"));
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
EditorGUILayout.PropertyField(blockOutlineAndGlow);
|
||||
EditorGUILayout.PropertyField(blockOverlay);
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties()) {
|
||||
hb.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user