diff --git a/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity b/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity new file mode 100644 index 0000000..061c591 Binary files /dev/null and b/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity differ diff --git a/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity.meta b/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity.meta new file mode 100644 index 0000000..d02b644 --- /dev/null +++ b/Assets/uDesktopDuplication/Examples/Scenes/Toggle Monitors.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 78e54899a518eb749a589b921a1b263f +timeCreated: 1477650252 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs b/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs new file mode 100644 index 0000000..97c68c9 --- /dev/null +++ b/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +public class ToggleMonitors : MonoBehaviour +{ + void Update() + { + if (Input.GetKeyDown(KeyCode.Tab)) { + var texture = GetComponent(); + if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) { + texture.monitorId--; + } else { + texture.monitorId++; + } + } + } +} + diff --git a/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs.meta b/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs.meta new file mode 100644 index 0000000..5cc00b6 --- /dev/null +++ b/Assets/uDesktopDuplication/Examples/Scripts/ToggleMonitors.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 602d3a9bed585d14eaf21e0528d24d54 +timeCreated: 1477650268 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: