OneShotOneKill/Assets/Script/UGUI/Common/GameUI.cs

25 lines
719 B
C#
Raw Normal View History

2026-01-07 21:27:42 +00:00
using UnityEngine;
public class GameUI : MonoBehaviourSingletonTemplate<GameUI>
{
public Camera m_UICamera;
private void Update()
{
if (Input.GetMouseButtonDown(0))
{
// 1⃣ 마우스 위치(화면 좌표)
Vector3 mousePos = Input.mousePosition;
// 2⃣ UI 카메라 기준의 월드 좌표로 변환
Vector3 worldPos = m_UICamera.ScreenToWorldPoint(mousePos);
// 3⃣ Z값 고정 (UI 평면 상)
worldPos.z = 0f;
// 4⃣ 이펙트 생성
//if (EffectMgr.Ins && EffectMgr.Ins.LoadComplete)
// EffectMgr.Ins.Show_Effect("TouchEffect", worldPos);
2026-01-07 21:27:42 +00:00
}
}
}