Aetheria/Assets/Wwise/Deployment/API/Handwritten/Common/AkShowOnlyAttribute.cs
Reinier Vens db8c3c7779 Initial Wwise Integration
Created wwise project
Integrated inventory UI sounds
Improved projectile weapon behavior (randomized start position, stopped them from self-destructing at target range when airburst is disabled)
2021-02-27 20:53:36 +00:00

21 lines
773 B
C#

public class AkShowOnlyAttribute : UnityEngine.PropertyAttribute
{
#if UNITY_EDITOR
[UnityEditor.CustomPropertyDrawer(typeof(AkShowOnlyAttribute))]
public class PropertyDrawer : UnityEditor.PropertyDrawer
{
public override float GetPropertyHeight(UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
{
return UnityEditor.EditorGUI.GetPropertyHeight(property, label, true);
}
public override void OnGUI(UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
{
var saveEnabled = UnityEngine.GUI.enabled;
UnityEngine.GUI.enabled = false;
UnityEditor.EditorGUI.PropertyField(position, property, label, true);
UnityEngine.GUI.enabled = saveEnabled;
}
}
#endif // #if UNITY_EDITOR
}