Skip to content

Commit 7b081e1

Browse files
committed
Lane arrows look better and work
1 parent 55ba94e commit 7b081e1

File tree

2 files changed

+196
-92
lines changed

2 files changed

+196
-92
lines changed

TLM/TLM/UI/CanvasGUI/WorldSpaceGUI.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void SetupRectTransform(GameObject gameObject, Vector3 pos, Vector2 size
7373
var rectTransform = gameObject.GetComponent<RectTransform>();
7474

7575
// adjust position from a more natural way to Unity3d Y facing down
76-
pos.y = -(pos.y + size.y);
76+
// pos.y = -(pos.y + size.y);
7777

7878
rectTransform.localPosition = pos;
7979
rectTransform.localScale = new Vector3(1f, 1f, 1f);
@@ -198,14 +198,16 @@ public void HandleInput() {
198198
/// <returns></returns>
199199
public List<RaycastResult> RaycastMouse() {
200200
// Set up the new Pointer Event
201+
var results = new List<RaycastResult>();
202+
if (raycaster_ == null) {
203+
return results;
204+
}
205+
201206
var pointerEventData = new PointerEventData(eventSystem_);
202207

203208
// Set the Pointer Event Position to that of the mouse position
204209
pointerEventData.position = Input.mousePosition;
205210

206-
// Create a list of Raycast Results
207-
var results = new List<RaycastResult>();
208-
209211
// Raycast using the Graphics Raycaster and mouse click position
210212
raycaster_.Raycast(pointerEventData, results);
211213
return results;

0 commit comments

Comments
 (0)