2023-01-22 16:38:23 +01:00
|
|
|
|
using ABI.CCK.Components;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
#if CCK_ADDIN_MAGICACLOTHSUPPORT
|
|
|
|
|
using MagicaCloth;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace ABI.CCK.Scripts.Editor
|
|
|
|
|
{
|
2024-08-03 22:24:42 +02:00
|
|
|
|
[CanEditMultipleObjects]
|
2023-01-22 16:38:23 +01:00
|
|
|
|
[CustomEditor(typeof(ABI.CCK.Components.CVRPointer), true)]
|
|
|
|
|
public class CCK_CVRPointerEditor : UnityEditor.Editor
|
|
|
|
|
{
|
|
|
|
|
public override void OnInspectorGUI()
|
|
|
|
|
{
|
|
|
|
|
base.OnInspectorGUI();
|
|
|
|
|
#if CCK_ADDIN_MAGICACLOTHSUPPORT
|
|
|
|
|
var components = ((CVRPointer) target).GetComponentsInParent<BaseCloth>();
|
|
|
|
|
if (components.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
EditorGUILayout.HelpBox(
|
|
|
|
|
"A MagicaCloth component was detected on this Object or its parent. This can lead to pointers to not work as intended.",
|
|
|
|
|
MessageType.Error
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|