Skip to content

Commit 4aad85f

Browse files
committed
[Docs] Updated README.md with folder Images/Screenshots for editor imgs
1 parent 6c85deb commit 4aad85f

File tree

7 files changed

+57
-12
lines changed

7 files changed

+57
-12
lines changed

.github/scripts/functions.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,32 @@ copyFilesForPublish() {
203203
done
204204
}
205205

206+
# TODO: [Feature] Use this function to loop over all packages and do all operations (copy files, rename and publish)
207+
# @see checkPkgRoot
208+
# @see [How do you store a list of directories into an array in Bash?](https://stackoverflow.com/a/4495304)
209+
fetchPackages() {
210+
local packages_root=$1
211+
checkPkgRoot
212+
213+
# PS: "<PATH>/*/" is a glob that list only directories
214+
if [ -z $packages_root ]
215+
then
216+
packages_root=(
217+
$PKG_ROOT/Packages/*/
218+
)
219+
elif [ -d $packages_root ]
220+
then
221+
packages_root=(
222+
$packages_root/*/
223+
)
224+
fi
225+
226+
for package_path in "${packages_root[@]}"
227+
do
228+
echo "[FETCH PACKAGES] Package: '$package_path'"
229+
done
230+
}
231+
206232
# TODO: Move this function to another script file (e.g .github/scripts/local.sh)
207233
# TODO: Move common functions dependencies to another script file in order to reuse (e.g .github/scripts/common.sh)
208234
#
@@ -280,6 +306,9 @@ run() {
280306
elif [ $1 == "githubActionsVariables" ]
281307
then
282308
githubActionsOutputs
309+
elif [ $1 == "fetchPackages" ]
310+
then
311+
fetchPackages $2
283312
elif [ $1 == "copyFilesForPublish" ]
284313
then
285314
copyFilesForPublish $2 $3

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,14 @@ dist
289289
.yarn/unplugged
290290
.yarn/build-state.yml
291291
.yarn/install-state.gz
292-
.pnp.*
292+
.pnp.*
293+
294+
# ---------------------
295+
# Custom.gitignore
296+
# ---------------------
297+
298+
[gG]it/*
299+
*.[pP]atch/*
300+
*.[pP]atches/*
301+
302+
node_modules.meta
File renamed without changes.
File renamed without changes.

Packages/com.benoitfreslon.vibration/.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,10 @@ dist
289289
.yarn/unplugged
290290
.yarn/build-state.yml
291291
.yarn/install-state.gz
292-
.pnp.*
292+
.pnp.*
293+
294+
# ---------------------
295+
# Custom.gitignore
296+
# ---------------------
297+
298+
node_modules.meta

Packages/com.benoitfreslon.vibration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"displayName": "Vibration",
55
"description": "Native free plugin for Unity for Android, iOS and WebGL. Use custom vibrations/haptics on mobile.",
66
"unity": "2019.3",
7-
"version": "0.1.3",
7+
"version": "0.1.4",
88
"keywords": [],
99
"devDependencies": {
1010
"cross-var": "^1.1.0",

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Send tips to <https://paypal.me/UnityVibrationPlugin>
1818

1919
- <img src="./Images/Icons/android-icon.png" alt="Aimeos logo" title="Android" align="center" height="32" /> Android
2020
- <img src="./Images/Icons/ios-icon.png" alt="Aimeos logo" title="iOS" align="center" height="32" /> iOS
21-
- <img src="./Images/Icons/webgl-icon.png" alt="Aimeos logo" title="iOS" align="center" height="32" /> <a href="https://caniuse.com/webgl2"> WebGL </a> (some limitations apply on Mobile)
21+
- <img src="./Images/Icons/webgl-icon.png" alt="Aimeos logo" title="iOS" align="center" height="32" /> [WebGL](https://caniuse.com/webgl2) (some limitations apply on Mobile)
2222

2323
## Installation
2424

@@ -121,15 +121,15 @@ You also can edit `Packages/manifest.json` manually, just add:
121121

122122
- `"com.benoitfreslon.vibration": "https://github.com/BenoitFreslon/Vibration.git#<LATEST_VERSION>",`
123123

124-
Or you can simply copy and paste the entire `[upm]` branch content from this repo, to your Unity3D `Packages/com.benoitfreslon.vibration` folder.
124+
Or you can simply copy and paste the entire `[upm]` branch content from this repo, to your Unity3D `Packages/<PACKAGE_NAME>` folder.
125125

126126
## Getting Started
127127

128128
There are 2 ways to use this plugin:
129129

130130
1. Use the `Runtime/VibrationComponent.cs` script attached to a _gameObject_ **(Recommended)**
131131

132-
![Vibration Component](./Images/vibration-component-inspector.png)
132+
![Vibration Component](./Images/Screenshots/vibration-component-inspector.png)
133133

134134
On that script, you can:
135135

@@ -306,7 +306,7 @@ vibration using haptic engine
306306
//npm.pkg.github.com/:_authToken=<GITHUB_TOKEN>
307307
```
308308

309-
Or, use the file `Packages/com.benoitfreslon.vibration/.npmrc` that already exists in this repository:
309+
Or, use the file `Packages/<PACKAGE_NAME>/.npmrc` that already exists in this repository:
310310

311311
```bash
312312
# Export the environment variable "$GITHUB_TOKEN"
@@ -325,12 +325,12 @@ vibration using haptic engine
325325

326326
# Run the npm scripts
327327
npm install
328-
npm run pack:package # Pack in a .tgz for testing (optional)
329328
npm run publish:package # Publish from repository ROOT path
330329

331-
cd Packages/com.benoitfreslon.vibration
332-
npm package:publish-from-local # Publish from package path
333-
npm publish:from-local # Or use this another script alias for publishing (optional)
330+
cd Packages/<PACKAGE_NAME>
331+
npm run pack:package # Pack in a .tgz for testing (optional)
332+
npm run package:publish-from-local # Publish from package path
333+
npm run publish:from-local # Or use this another script alias for publishing (optional)
334334
``````
335335

336336
> **WARNING:** Avoid use the common **`npm publish`** directly, because the hooks `prepare`, `prepublish` ... aren't triggered in this package. They have conflicts with [OpenUPM Azure pipelines](https://dev.azure.com/openupm/openupm/_build?definitionId=1&_a=summary) and fail when try run automation publishing tags to OpenUPM :(
@@ -341,7 +341,7 @@ Optionally, you can run specific npm scripts inside of `Packages/<PACKAGE_NAME>`
341341
342342
```bash
343343
# Go to the package dir
344-
cd Packages/com.benoitfreslon.vibration
344+
cd Packages/<PACKAGE_NAME>
345345
346346
# Pack a .tgz for testing (optional)
347347
npm run package:pack

0 commit comments

Comments
 (0)