Tetra/Minesweeper/Library/PackageCache/com.unity.localization/Editor/Plugins/UITK/PersistentVariableUxmlSerializedDataPropertyDrawer.cs
2025-05-01 01:48:08 -07:00

20 lines
677 B
C#

#if MODULE_UITK && UNITY_2023_3_OR_NEWER
using UnityEditor.UIElements;
using UnityEditor;
using UnityEngine.UIElements;
using UnityEngine.Localization.SmartFormat.PersistentVariables;
using UnityEditor.Localization.UI;
[CustomPropertyDrawer(typeof(Variable<>.UxmlSerializedData), true)]
class PersistentVariableUxmlSerializedDataPropertyDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
var value = property.FindPropertyRelative(nameof(Variable<int>.ValueUXML));
return new PropertyField(value, ManagedReferenceUtility.GetDisplayName(property.managedReferenceFullTypename).text);
}
}
#endif