public void DragSelectionBox(Camera main, CursorPanGroup group, CursorButton button, TutorialAIManager manager, float delayTime, string methodName) { BoxSelector selector = main.GetComponent<BoxSelector>(); if (selector == null) { Debug.LogError("Cannot find Box Selector component from camera, " + main.ToString() + "."); return; } if (button != CursorButton.Left_Click) { Debug.LogError("Selection box only works with left mouse button."); return; } selector.StartBoxSelection(group, 0.5f); this.icon.SetButton(button); this.buttonPressedElapsedTime = 0f; this.isButtonPressed = true; this.isButtonHeld = true; this.isAppearing = true; this.panningElapsedTime = 0f; this.startingPosition = group.start; this.endingPosition = group.end; this.rectTransform.position = group.start; manager.Invoke(methodName, delayTime); this.Invoke("HeldButtonRelease", delayTime); }