mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-18 12:20:06 +08:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
|
using UnityEditor;
|
|||
|
using static nadena.dev.modular_avatar.core.editor.Localization;
|
|||
|
|
|||
|
namespace nadena.dev.modular_avatar.core.editor
|
|||
|
{
|
|||
|
[CustomEditor(typeof(ModularAvatarProbeAnchor))]
|
|||
|
[CanEditMultipleObjects]
|
|||
|
internal class ProbeAnchorEditor : MAEditorBase
|
|||
|
{
|
|||
|
private SerializedProperty prop_probeTarget;
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
prop_probeTarget = serializedObject.FindProperty(nameof(ModularAvatarProbeAnchor.probeTarget));
|
|||
|
}
|
|||
|
|
|||
|
private void ShowParametersUI()
|
|||
|
{
|
|||
|
serializedObject.Update();
|
|||
|
|
|||
|
EditorGUILayout.PropertyField(prop_probeTarget, G("probeanchor.target"));
|
|||
|
|
|||
|
serializedObject.ApplyModifiedProperties();
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnInnerInspectorGUI()
|
|||
|
{
|
|||
|
EditorGUILayout.HelpBox(S("probe_anchor.help"), MessageType.Info);
|
|||
|
EditorGUI.BeginChangeCheck();
|
|||
|
ShowParametersUI();
|
|||
|
if (EditorGUI.EndChangeCheck())
|
|||
|
{
|
|||
|
serializedObject.ApplyModifiedProperties();
|
|||
|
}
|
|||
|
|
|||
|
Localization.ShowLanguageUI();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|