-
v1.8.0 Release
StableSome checks failedCreate UPM branches and run NPM publish / update (push) Has been cancelledreleased this
2021-11-21 17:17:06 +08:00 | 1 commits to master since this releaseThe directory structure has been changed to support UPM. You can now use the Package Manager from the following URL:
And also uDesktopDuplication has been published to npm. You can import uLipSync into your project by registering the following url and scope to Scoped Registry.
- URL:
https://registry.npmjs.com - Scope:
com.hecomi
Downloads
- URL:
-
v1.7.0 Release Stable
released this
2020-03-15 23:29:48 +08:00 | 7 commits to master since this releaseUpdate
- Add
asmdeffiles to separate uDD scripts into different projects. - Add
ColorScale(for unlit shaders) andEmissive(for a standard shader).
Bug Fix
- Fix cursor captre bug #33

Downloads
- Add
-
v1.6.0 Release Stable
released this
2018-12-28 23:05:06 +08:00 | 18 commits to master since this releaseUpdate
- add
Monitor.bufferto access the buffer pointer directly.
Bug Fix
- fix GetPixels() bug #27.
Example
using UnityEngine; using System; using System.Runtime.InteropServices; public class BufferExample : MonoBehaviour { [SerializeField] uDesktopDuplication.Texture uddTexture; Texture2D texture_; Color32[] pixels_; GCHandle handle_; IntPtr ptr_ = IntPtr.Zero; [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, SetLastError = false)] public static extern IntPtr memcpy(IntPtr dest, IntPtr src, int count); void Start() { if (!uddTexture) return; uddTexture.monitor.useGetPixels = true; UpdateTexture(); } void OnDestroy() { if (ptr_ != IntPtr.Zero) { handle_.Free(); } } void Update() { if (!uddTexture) return; if (uddTexture.monitor.width != texture_.width || uddTexture.monitor.height != texture_.height) { UpdateTexture(); } CopyTexture(); } void UpdateTexture() { var width = uddTexture.monitor.width; var height = uddTexture.monitor.height; // TextureFormat.BGRA32 should be set but it causes an error now. texture_ = new Texture2D(width, height, TextureFormat.RGBA32, false); texture_.filterMode = FilterMode.Bilinear; pixels_ = texture_.GetPixels32(); handle_ = GCHandle.Alloc(pixels_, GCHandleType.Pinned); ptr_ = handle_.AddrOfPinnedObject(); GetComponent<Renderer>().material.mainTexture = texture_; } void CopyTexture() { var buffer = uddTexture.monitor.buffer; if (buffer == IntPtr.Zero) return; var width = uddTexture.monitor.width; var height = uddTexture.monitor.height; memcpy(ptr_, buffer, width * height * sizeof(Byte) * 4); texture_.SetPixels32(pixels_); texture_.Apply(); } }The texture of the right-side plane is updated by copying the buffer directly with
memcpy()from the left-side one.Downloads
- add