以下の内容はhttps://baba-s.hatenablog.com/entry/2022/12/23/090000より取得しました。


【Unity】EventSystem.current.IsPointerOverGameObject が検出したゲームオブジェクトを取得できる StandaloneInputModule

リポジトリ

使用例

using Kogane;
using UnityEngine;
using UnityEngine.EventSystems;

public class Example : MonoBehaviour
{
    [SerializeField] private CustomStandaloneInputModule m_module;

    private void Update()
    {
        if ( EventSystem.current.IsPointerOverGameObject() )
        {
            // EventSystem.current.IsPointerOverGameObject が検出したゲームオブジェクトを取得
            var lastPointerGameObject = m_module.GetLastPointerGameObject();

            Debug.Log( lastPointerGameObject, lastPointerGameObject );
        }
    }
}



以上の内容はhttps://baba-s.hatenablog.com/entry/2022/12/23/090000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14