728x90 반응형 유니티스크립트1 [Unity] 클릭한 오브젝트(버튼)의 이름 가져오기 using UnityEngine.EventSystems; public class ButtonController : MonoBehaviour { public void GetButtonName(){ // 버튼 이름 가져오기 string ButtonName = EventSystem.current.currentSelectedGameObject.name; Debug.Log(ButtonName); } } 기능이 같지만 버튼 이름이 다를 경우처럼 클릭한 오브젝트(버튼)의 이름을 가져오기 위한 방법입니다! 2021. 11. 30. 이전 1 다음 728x90 반응형