Android

Debug.Log

8월 14, 2021 Unity No comments , , ,

Unity에서 Log의 Color 설정

Debug.Log ("<color=green>Menu State</color> OnActive");
Debug.Log ("<color=red>Menu State</color> OnDeactivate");
Debug.Log ("<color=yellow>Menu State</color> OnUpdate");

Unity Tips

8월 14, 2021 Unity No comments , ,

Does not Touch  / Mouse Down


문제점

Unity MonoBehaior에 아래와 같이 OnMouseDown() or IPointerDownHandler를 사용 하였지만,동작 하지 않음

public class Tile : MonoBehaviour, IPointerDownHandler 
{
    void OnMouseDown() 
    { 
        Debug.Log("OnMouseUp"); 
    } 
    public void OnPointerDown(PointerEventData eventData) 
    { 
        Debug.Log(this.gameObject.name + " Was Clicked."); 
    }
}

해결책

Main Carmera의 Position.Z를 0에서 -10로 변경 후 정상 동작