public static Collider GetObject(Vector3?screenPos = null, LayerMask?layer = null, Camera camera = null) { if (_Instance == null) { _Instance = new GameObject().AddComponent <Mouse3D>(); } return(_Instance.InternalGetObject(screenPos, layer, camera)); }
private void Awake() { if (_Instance != null && _Instance != this) { Destroy(gameObject); return; } _Instance = this; }
public static Vector3 GetPosOnVirtualPlane(Vector3 point, Vector3 normal, Vector3?screenPos = null, Camera camera = null) { if (_Instance == null) { _Instance = new GameObject().AddComponent <Mouse3D>(); } return(_Instance.InternalGetPosOnVirtualPlane(point, normal, screenPos, camera)); }
public static Vector3 GetPos(Vector3?screenPos = null, LayerMask?layer = null, Camera camera = null) { if (_Instance == null) { _Instance = new GameObject().AddComponent <Mouse3D>(); } var pos = _Instance.InternalGetPos(screenPos, layer, camera); return(pos); }