/// <inheritdoc /> protected override void OnDisable() { mouseHandler.Dispose(); mouseHandler = null; base.OnDisable(); }
private void disableMouse() { if (mouseHandler != null) { mouseHandler.Dispose(); mouseHandler = null; } }
/// <inheritdoc /> protected override void OnEnable() { base.OnEnable(); Debug.LogWarning("[TouchScript] MouseInput is deprecated! Please use StandardInput instead."); if (DisableOnMobilePlatforms) { switch (Application.platform) { case RuntimePlatform.Android: case RuntimePlatform.IPhonePlayer: case RuntimePlatform.WP8Player: case RuntimePlatform.MetroPlayerARM: case RuntimePlatform.MetroPlayerX64: case RuntimePlatform.MetroPlayerX86: case RuntimePlatform.TizenPlayer: case RuntimePlatform.BlackBerryPlayer: // don't need mouse here enabled = false; return; } } mouseHandler = new MouseHandler(Tags, beginTouch, moveTouch, endTouch, cancelTouch); }
private void enableMouse() { mouseHandler = new MouseHandler(MouseTags, beginTouch, moveTouch, endTouch, cancelTouch); Debug.Log("[TouchScript] Initialized Unity mouse input."); }