C# 클래스 ScreenRaycaster, swip3

상속: MonoBehaviour
파일 보기 프로젝트 열기: unit9/swip3 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Cameras Camera[]
IgnoreLayerMask LayerMask
RayThickness float
VisualizeRaycasts bool

공개 메소드들

메소드 설명
Raycast ( Vector2 screenPos, RaycastHit &hit ) : bool
Start ( ) : void

비공개 메소드들

메소드 설명
Raycast ( Camera cam, Vector2 screenPos, RaycastHit &hit ) : bool

메소드 상세

Raycast() 공개 메소드

public Raycast ( Vector2 screenPos, RaycastHit &hit ) : bool
screenPos Vector2
hit UnityEngine.RaycastHit
리턴 bool

Start() 공개 메소드

public Start ( ) : void
리턴 void

프로퍼티 상세

Cameras 공개적으로 프로퍼티

List of cameras to use for each raycast. Each camera will be considered in the order specified in this list, and the Raycast method will continue until a hit is detected.
public Camera[] Cameras
리턴 Camera[]

IgnoreLayerMask 공개적으로 프로퍼티

Layers to ignore when raycasting
public LayerMask IgnoreLayerMask
리턴 LayerMask

RayThickness 공개적으로 프로퍼티

Thickness of the ray. Setting rayThickness to 0 will use a normal Physics.Raycast() Setting rayThickness to > 0 will use Physics.SphereCast() of radius equal to half rayThickness ** IMPORTANT NOTE ** According to Unity's documentation, Physics.SphereCast() doesn't work on colliders setup as triggers
public float RayThickness
리턴 float

VisualizeRaycasts 공개적으로 프로퍼티

Property used while in the editor only. Toggles the visualization of the raycasts as red lines for misses, and green lines for hits (visible in scene view only)
public bool VisualizeRaycasts
리턴 bool