Case closed by myself.
Use this script and put to the interactable object with pointer click.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class PointerTrigger : MonoBehaviour, IPointerEnterHandler,IPointerExitHandler
{
bool active = false;
public void OnPointerEnter(PointerEventData eventData)
{
active = true;
}
public void OnPointerExit(PointerEventData eventData)
{
active = false;
}
private void Update()
{
if (active && Input.GetButtonDown("Fire1"))
{
Debug.Log("Fired");
var pointer = new PointerEventData(EventSystem.current);
ExecuteEvents.Execute(gameObject, pointer, ExecuteEvents.pointerClickHandler);
}
}
}