From 658bd557f56ffd20868624df8c3ff7072eb34bd5 Mon Sep 17 00:00:00 2001 From: A F <49113047+arty-F@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:17:14 +0700 Subject: [PATCH 1/3] Update README.md --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2dfc27..cecd804 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -# UniWebGlClipboard \ No newline at end of file +# UniWebGlClipboard + +Library for sending text to browser clipboard. + +# Install from git URL + +Requires a version of unity that supports path query parameter for git packages (Unity 2021.3 or later). You can add a reference `https://github.com/arty-F/UniWebGlClipboard.git?path=Assets/UniWebGlClipboard` to Package Manager. + +# Install from .unitypackage + +Download the latest `.unitypackage` file from [releases](https://github.com/arty-F/UniWebGlClipboard/releases) page and import downloaded package into unity. + +# Usage + +```csharp + GUIUtility.systemCopyBuffer = _message; +#if UNITY_WEBGL && !UNITY_EDITOR + WebglClipboard.SendToClipboard(GUIUtility.systemCopyBuffer); +#endif +``` From 01ce0b56212f518275361f880e6bdaceab12a60e Mon Sep 17 00:00:00 2001 From: A F <49113047+arty-F@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:19:12 +0700 Subject: [PATCH 2/3] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cecd804..81f9e92 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,10 @@ Requires a version of unity that supports path query parameter for git packages Download the latest `.unitypackage` file from [releases](https://github.com/arty-F/UniWebGlClipboard/releases) page and import downloaded package into unity. # Usage - +```csharp +WebglClipboard.SendToClipboard("you text"); +``` +In order to work in the editor and WebGL build use these: ```csharp GUIUtility.systemCopyBuffer = _message; #if UNITY_WEBGL && !UNITY_EDITOR From c64431e3b4d5da94dc4b4b3ace41194ffde9e1f0 Mon Sep 17 00:00:00 2001 From: A F <49113047+arty-F@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:20:25 +0700 Subject: [PATCH 3/3] Update LICENSE.txt --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 8aa2645..9877ada 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) [year] [fullname] +Copyright (c) 2024 arty-F Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal