Programming/UnityGame_etc
[Unity] Tag와 Layer 설정
HiGaTsu Ryu
2022. 7. 19. 17:45
반응형
맨날 까먹어서 메모용
gameObject.tag = "Player";
int LayerIgnoreRaycast = LayerMask.NameToLayer("Ignore Raycast");
gameObject.layer = LayerIgnoreRaycast;
[참고 Unity Documentation]
- GameObject.tag : https://docs.unity3d.com/ScriptReference/GameObject-tag.html
- GameObject.layer : https://docs.unity3d.com/ScriptReference/GameObject-layer.html
반응형