From 09e5807a8e6ecc9c0395cf0645e3eb8e3cf93185 Mon Sep 17 00:00:00 2001 From: Vladimir Berezkin Date: Wed, 13 Mar 2019 17:23:44 +0300 Subject: [PATCH] Use only left mouse button --- Assets/Resources/Expload/OffscreenCEF.cs | 16 +++++++--------- package/expload.unitypackage | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Assets/Resources/Expload/OffscreenCEF.cs b/Assets/Resources/Expload/OffscreenCEF.cs index 99e4b2b..323da93 100644 --- a/Assets/Resources/Expload/OffscreenCEF.cs +++ b/Assets/Resources/Expload/OffscreenCEF.cs @@ -118,16 +118,14 @@ private IEnumerator MessagePump() void Update() { var p = Input.mousePosition; - for (int i = 0; i < 3; ++i) + int i = 0; // use only left mouse button + if (Input.GetMouseButtonDown(i)) { - if (Input.GetMouseButtonDown(i)) - { - cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, false); - } - if (Input.GetMouseButtonUp(i)) - { - cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, true); - } + cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, false); + } + if (Input.GetMouseButtonUp(i)) + { + cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, true); } foreach (char code in Input.inputString) { diff --git a/package/expload.unitypackage b/package/expload.unitypackage index 0157b34..9b56053 100644 --- a/package/expload.unitypackage +++ b/package/expload.unitypackage @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:801b8b869efb8e79a90cf6dfca507ba89856e3c1aed68d2470a8e3fb11aadc79 -size 58041212 +oid sha256:cc7c084b42503ba3bc62049a9660f12162d6755ce04db681c09bb462ea8d1a46 +size 58041324