VR4Medical/ICI/Library/PackageCache/com.unity.xr.interaction.toolkit@42ef3600567b/Editor/Datums/FollowPresetDatumPropertyDrawer.cs
2025-07-29 13:45:50 +03:00

26 lines
1.1 KiB
C#

using System;
using Unity.XR.CoreUtils.Datums.Editor;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit.UI.BodyUI;
namespace UnityEditor.XR.Interaction.Toolkit.Datums.Editor
{
/// <summary>
/// Datum PropertyDrawer implementation for Follow Preset Datum Property Drawer.
/// </summary>
[CustomPropertyDrawer(typeof(FollowPresetDatumProperty))]
[Obsolete("The Affordance System namespace and all associated classes have been deprecated. The existing affordance system will be moved, replaced and updated with a new interaction feedback system in a future version of XRI.")]
public class FollowPresetDatumPropertyDrawer : DatumPropertyDrawer
{
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
SerializedProperty selectedValue = GetSelectedProperty(property);
if (selectedValue.hasVisibleChildren)
{
return EditorGUI.GetPropertyHeight(selectedValue, true);
}
return base.GetPropertyHeight(property, label);
}
}
}