Skip to content

Commit

Permalink
[Docs] Added Github package installation token requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
mfdeveloper committed Feb 14, 2024
1 parent 94a2683 commit 98b3787
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
Binary file added Images/github-package-auth-require-token.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Mobile scripts (Android / IOS)

Put here any specific `C#` script for Mobile platforms.

> **PS:** For Mobile plugins, prefer use a folder structure from Unity guidelines such as:
> [Unity Documentation: Import and configure plug-ins](https://docs.unity3d.com/Manual/PluginInspector.html)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Packages/com.benoitfreslon.vibration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Vibration",
"description": "Native free plugin for Unity for Android, iOS and WebGL. Use custom vibrations/haptics on mobile.",
"unity": "2019.3",
"version": "0.1.7",
"version": "0.1.8",
"keywords": [],
"devDependencies": {
"cross-var": "^1.1.0",
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ openupm add com.benoitfreslon.vibration

```

Or alternatively, merge the snippet below to [Packages/manifest.json](https://docs.unity3d.com/Manual/upm-manifestPrj.html) manually
### OpenUPM package

Follow the installation guide from: [openupm/com.benoitfreslon.vibration](https://openupm.com/packages/com.benoitfreslon.vibration).

Alternatively, merge the snippet below to [Packages/manifest.json](https://docs.unity3d.com/Manual/upm-manifestPrj.html) manually

```jsonc
{
Expand All @@ -72,7 +76,9 @@ Or alternatively, merge the snippet below to [Packages/manifest.json](https://do

### Github package

1. Add a **`$HOME/.upmconfig.toml`** file with the TOKEN to authenticate on registry
1. Generate an **access token** on your Github account, following the guide: [Creating a personal access token (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).

2. Add a **`$HOME/.upmconfig.toml`** file with the TOKEN to authenticate on registry

```toml
[npmAuth."https://npm.pkg.github.com/@mfdeveloper"]
Expand All @@ -83,9 +89,11 @@ Or alternatively, merge the snippet below to [Packages/manifest.json](https://do
alwaysAuth = true
```

> **WARNING:** _GitHub/Gitlab_ Packages registry always requires authentication. For **_private_** and **_public_** packages.
> **WARNING:** _GitHub/Gitlab_ Packages registry always requires authentication. For **_private_** and **_public_** packages. If you don't have a Github account, or won't create a TOKEN, try use the [openupm](#openupm-package) package above.

![Github package authentication](./Images/github-package-auth-require-token.jpg)

2. Configure the scope **registry** and **dependency** in your Unity project `Packages/manifest.json`
3. Configure the scope **registry** and **dependency** in your Unity project `Packages/manifest.json`

```jsonc
{
Expand Down Expand Up @@ -237,7 +245,7 @@ Nope vibration: series of three weak booms (For iOS: only available with the hap

## Android Only

#### Custom duration in milliseconds
### Custom duration in milliseconds

`Vibration.Vibrate(500);`

Expand Down

0 comments on commit 98b3787

Please sign in to comment.