https://github.com/haoming02/image-clipboard-for-unity
Paste image into UnityEngine as Texture2D
https://github.com/haoming02/image-clipboard-for-unity
clipboard image-paste unity
Last synced: 2 months ago
JSON representation
Paste image into UnityEngine as Texture2D
- Host: GitHub
- URL: https://github.com/haoming02/image-clipboard-for-unity
- Owner: Haoming02
- License: mit
- Created: 2024-06-19T09:20:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T07:06:15.000Z (about 2 years ago)
- Last Synced: 2025-04-05T01:41:49.097Z (about 1 year ago)
- Topics: clipboard, image-paste, unity
- Language: C#
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Clipboard for Unity
A simple script that allows you to paste images into Unity applications
> [!Important]
> Since the script uses functions from `user32.dll`, it is only usable on **Windows** systems
### How to Use
Simply call the `NativeClipboard.Paste` function, which returns `true` on a successful paste along with the `Texture2D`.
> [!Note]
> - Works on images right-click copied from browser
> - Works on screenshots from `Snipping Tool` *(`Win + Shift + S`)*
> - Tested with **Unity 6** and **Edge** browser on **Windows 11**
> - Does **not** work when copying an image file from `file explorer`
Special Thanks: Gemini 2.5 Pro