void CheckIfCubePlacedInBox() { Cube cube = ObjectToMove.GetCube(); Box box = null; // GetUIObjectAtMousePos ignores ObjectToMove due to layer change. if (GetUIObjectAtMousePos() != null) { box = GetUIObjectAtMousePos().GetBox(); } if (cube != null && box != null) { MoveObjectBack = true; GameManager.Instance.ProductPlacedInBox(cube, box); } }