Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
arty-F committed Oct 12, 2024
2 parents a7e2864 + c64431e commit 3d86abd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# UniWebGlClipboard
# 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
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
WebglClipboard.SendToClipboard(GUIUtility.systemCopyBuffer);
#endif
```

0 comments on commit 3d86abd

Please sign in to comment.