This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Unity WebGL Copy and Paste | ||
|
||
For some reason Unity decided not to support copy and paste in WebGL. | ||
Here is an attempt to add it back in. No promises that it's perfect 😅 | ||
|
||
![screenshot](https://user-images.githubusercontent.com/234804/85100802-ff0bcf00-b23b-11ea-9030-24206085bd54.gif) | ||
|
||
At the moment there is only support for [InputField](https://docs.unity3d.com/2019.1/Documentation/Manual/script-InputField.html) and | ||
[`TMPro.TMP_InputField`](https://docs.unity3d.com/Packages/com.unity.textmeshpro@2.1/api/TMPro.TMP_InputField.html) | ||
|
||
Example: https://greggman.github.io/unity-webgl-copy-and-paste/ | ||
|
||
## Instructions | ||
|
||
1. Download and add in [this unity package](https://github.com/greggman/unity-webgl-copy-and-paste/releases/latest) into your project. | ||
|
||
2. Make a `GameObject` and add in the `WebGLCopyAndPaste` script. | ||
|
||
3. If you are using [`TMPro.TMP_InputField`](https://docs.unity3d.com/Packages/com.unity.textmeshpro@2.1/api/TMPro.TMP_InputField.html) then edit `Assets/WebGLCopyAndPaste/Scripts/WebGLCopyAndPaste.cs` | ||
and uncomment this line | ||
|
||
``` | ||
// #define WEBGL_COPY_AND_PASTE_SUPPORT_TEXTMESH_PRO | ||
``` |