Skip to content

Commit

Permalink
doc: Update License and README
Browse files Browse the repository at this point in the history
  • Loading branch information
qdot committed Apr 23, 2021
1 parent 3fdd6bc commit c5dd1a8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 81 deletions.
31 changes: 30 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020, Nonpolynomial Labs, LLC
Copyright (c) 2020-2021, Nonpolynomial Labs, LLC
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -25,3 +25,32 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

Buttplug Unity uses code from the IL2CPPStartProcess project:
https://github.com/josh4364/IL2cppStartProcess

Covered under the following MIT license:

MIT License

Copyright (c) 2019 June, Michał Petryka and Łukasz Jurczyk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
107 changes: 27 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,15 @@

[![Patreon donate button](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/qdot)
[![Github sponsor button](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/qdot)
[![Discourse Forum](https://img.shields.io/badge/discourse-forum-blue.svg)](https://metafetish.club)
[![Discord](https://img.shields.io/discord/353303527587708932.svg?logo=discord)](https://discord.buttplug.io)
[![Twitter](https://img.shields.io/twitter/follow/buttplugio.svg?style=social&logo=twitter)](https://twitter.com/buttplugio)

Unity Package for Buttplug support in Unity 2018.2+.

Only the following classes should be used:

- ButtplugClient
- ButtplugWebsocketConnector

Trying to use an embedded connector will fail as no
DeviceSubtypeManagers are distributed with this package (UWP doesn't
play well with Unity, so you wouldn't get Bluetooth anyways). It is
expected that anything built with this will either connect to
[Intiface Desktop](https://github.com/intiface/intiface-desktop) or
[Intiface CLI](https://github.com/intiface/intiface-cli-csharp).

Buttplug Unity contains a Intiface CLI executable, so Intiface Desktop
is not required. It is still recommended that you allow users to
connect out to ID somehow, though.

During the initial phase of rollout, Buttplug Unity will be updated frequently
and the API will change often. Any updates to the minor version (X in 0.X.Y)
will denote a breaking API change.

## Installation

- [Download latest zip or tgz from releases section](https://github.com/buttplugio/buttplug-unity/releases)
Expand All @@ -38,22 +21,15 @@ will denote a breaking API change.
- "Add Package from tarball" (if you downloaded the .tgz file).
- **Please note that "Add Package from git repo" will not work, see FAQ for
reasoning**.
- If using Unity 2018, you will need to restart Unity in order for the
StreamingAssets additions to show up. Unity 2019 does not require
this.
- If using Unity 2018, you will need to restart Unity in order for the StreamingAssets additions to
show up. Unity >= 2019 does not require this.
- Start using Buttplug classes in your scripts.

## Usage

To use Buttplug Unity, you need to set your Windows Player Settings to
use script version .Net 4.X. Setting to .Net Standard 2.0 may result
in weird JSON issues at runtime on builds, see [this issue on our
forums](https://github.com/buttplugio/buttplug-unity/issues/3) for more info.

See the [Buttplug Unity example
directory](https://github.com/buttplugio/buttplug-unity/tree/master/examples) as
well as the [Buttplug C#
examples](https://github.com/buttplugio/buttplug-csharp#library-usage-examples)
well as the [Buttplug Developer Guide](https://buttplug-developer-guide.docs.buttplug.io)
for code and usage advice.

Using Buttplug consists of the following steps:
Expand All @@ -79,79 +55,50 @@ soon.
### What hardware will this work with?

An up-to-date list is kept at [IOSTIndex, using the Buttplug C#
filter](https://iostindex.com/?filter0ButtplugSupport=1).
filter](https://iostindex.com/?filtersChanged=1&filter0Availability=Available,DIY&filter1ButtplugSupport=4).

### How does the Buttplug Unity package change my Unity project?

When the Buttplug Unity package is loaded, it checks to see whether a
[StreamingAssets
directory](https://docs.unity3d.com/Manual/StreamingAssets.html) already exists.
If not, it creates the directory, and under that, creates a Buttplug directory,
to which it copies the Intiface CLI executable. This allows us to make sure that
Unity packages the executable with your game.
When the Buttplug Unity package is loaded, it checks to see whether a [StreamingAssets
directory](https://docs.unity3d.com/Manual/StreamingAssets.html) already exists. If not, it creates
the directory, and under that, creates a Buttplug directory, to which it copies the Intiface CLI
executable. This allows us to make sure that Unity packages the executable with your game.

As of 0.0.1, in order to make usage as work-free as possible, this functionality
is automatic and there is no way to turn it off. If this affects your project in
adverse ways, or if you would like to have the option to only use [Intiface
Desktop](https://intiface.com/desktop) versus handling the binary yourself,
please file an issue (or if one is already filed, add a +1 comment), and we'll
try to figure out another way to do this.
As of 1.0.0, in order to make usage as work-free as possible, this functionality is automatic and
there is no way to turn it off. If this affects your project in adverse ways, or if you would like
to have the option to only use [Intiface Desktop](https://intiface.com/desktop) versus handling the
binary yourself, please file an issue (or if one is already filed, add a +1 comment), and we'll try
to figure out another way to do this.

### Why do I have to run an outside process alongside my game?

On windows, we use UWP to access bluetooth, which is how most sex toys
communicate with hosts. Direct linking UWP into Unity is an issue right now, so
we host this code in an external process.

By hosting hardware access externally, we also minimize the impact of errors and
crashes on the game process. While we certainly do our best to avoid errors,
dealing with hardware can sometimes be a dynamic and challenging situation,
where an extended period of normal usage can be suddenly interrupted by shit
going absolutely fucked. By keeping process separation as a boundary, we can
By hosting hardware access externally, we minimize the impact of errors and crashes on the game
process. While we certainly do our best to avoid errors, dealing with hardware can sometimes be a
dynamic and challenging situation, where an extended period of normal usage can be suddenly
interrupted by shit going absolutely fucked. By keeping process separation as a boundary, we can
assure games that as much of the fuckery as possible stays on the Buttplug side.

### Why is the executable 75mb?

At the moment, Buttplug Unity is built on top of the [Buttplug
C#](https://github.com/buttplugio/buttplug-csharp) implementation of the
[Buttplug Protocol Standard](https://buttplug-spec.docs.buttplug.io). In order
to distribute this in a way that is both simple to package and requires the
least amount of work for Unity, we use .Net Core App 3.1 with the Single File
packing option. This means we bundle all of our dependencies down to the
framework level into the executable, which makes for a large binary.

At some point in the near-to-medium future, we will be moving to [Buttplug
Rust](https://github.com/buttplugio/buttplug-rs) for our main implementation,
which should reduce the binary size by at least 10x if not more. This should
have no effect on games built with Buttplug Unity, other than reduced binary
sizes.

### Does Buttplug Unity work with IL2CPP?

Not yet. See
[https://github.com/buttplugio/buttplug-unity/issues/1](https://github.com/buttplugio/buttplug-unity/issues/1).
Yes.

### Why can't I add the package from a git repo?

Due to the large binaries required for the package, keeping Buttplug-Unity
completely in a git repo would make the repo very large, very fast. Therefore we
only keep text files in the repo, and bring in binaries as part of our build
process.
Due to the large binaries required for the package, keeping Buttplug-Unity completely in a git repo
would make the repo very large, very fast. Therefore we only keep text files in the repo, and bring
in binaries as part of our build process.

### Can I use Buttplug Unity in my commercial game?

Yes, Buttplug Unity falls under the same BSD 3-Clause license as the
rest of the library, meaning you just need a copyright acknowledgement
in your game credits and license file. If you are interested in
featuring our logos on your loading screen (which we appreciate!),
please contact us on [Discord](https://discord.buttplug.io) or
[Twitter](https://twitter.com/buttplugio) to discuss.
Yes, Buttplug Unity falls under the same BSD 3-Clause license as the rest of the library, meaning
you just need a copyright acknowledgement in your game credits and license file. If you are
interested in featuring our logos on your loading screen (which we appreciate!), please contact us
on [Discord](https://discord.buttplug.io) or [Twitter](https://twitter.com/buttplugio) to discuss.

### How can I get direct support from the Buttplug developers for my game?

The Buttplug Developers are happy to consider paid support contracts.
Please contact on [Discord](https://discord.buttplug.io) or
[Twitter](https://twitter.com/buttplugio) to discuss.
The Buttplug Developers are happy to consider paid support contracts. Please contact on
[Discord](https://discord.buttplug.io) or [Twitter](https://twitter.com/buttplugio) to discuss.

### I don't see my question here, what should I do?

Expand Down

0 comments on commit c5dd1a8

Please sign in to comment.