private void Awake() { _inputController = new InputController(); _selectRectangle = this.GetComponentInChildren <SelectionRectangleComponent>(); if (_selectRectangle == null) { Debug.LogWarning("Missing SelectionRectangleComponent, this is required by the input receiver to handle unit selection."); } if (Application.platform != RuntimePlatform.WindowsPlayer && Application.platform != RuntimePlatform.WindowsEditor && Application.platform != RuntimePlatform.OSXPlayer && Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.LinuxPlayer) { Debug.LogWarning("The default basic input receiver only works on Windows, Linux and Mac."); } }
private void Awake() { _inputController = new InputController(); _selectRectangle = this.GetComponentInChildren<SelectionRectangleComponent>(); if (_selectRectangle == null) { Debug.LogWarning("Missing SelectionRectangleComponent, this is required by the input receiver to handle unit selection."); } _isMac = (Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXWebPlayer); if (Application.platform != RuntimePlatform.WindowsPlayer && Application.platform != RuntimePlatform.WindowsEditor && Application.platform != RuntimePlatform.WindowsWebPlayer && !_isMac) { Debug.LogWarning("The default basic input receiver only works on Windows and Mac."); } }