2022-02-08 01:07:03 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.EventSystems;
|
|
|
|
|
2022-03-14 14:21:05 +00:00
|
|
|
namespace HeavenStudio.Editor
|
2022-02-08 01:07:03 +00:00
|
|
|
{
|
|
|
|
public class DisableSelectOnHover : MonoBehaviour
|
|
|
|
{
|
|
|
|
public EventParameterManager eventParameterManager;
|
|
|
|
|
2022-03-01 01:18:06 +00:00
|
|
|
// this is programmed on duct tape https://youtu.be/zMWA0ipQ94w?t=868
|
2022-02-08 01:07:03 +00:00
|
|
|
private void LateUpdate()
|
|
|
|
{
|
|
|
|
eventParameterManager.canDisable = true;
|
|
|
|
for (int i = 0; i < transform.childCount; i++)
|
|
|
|
{
|
|
|
|
if (Editor.MouseInRectTransform(transform.GetChild(i).GetComponent<RectTransform>()))
|
|
|
|
{
|
|
|
|
eventParameterManager.canDisable = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|