// Use this for initialization void Start() { Debug.Log("Adding to press"); press += StartDrawing; release += StopDrawing; move += Move; #if UNITY_EDITOR || UNITY_STANDALONE_WIN handleInput += _MouseInputHandler; #elif UNITY_ANDROID handleInput += _TouchInputHandler; #endif }
/// <summary> /// Initialize a new button instance. /// </summary> /// <param name="text">Button label</param> /// <param name="pressHandler">Event handler for button presses</param> public Button(string text, PressHandler pressHandler) { Text = text; OnPress += pressHandler; }