diff --git a/.github/scripts/functions.sh b/.github/scripts/functions.sh
new file mode 100755
index 0000000..465ef43
--- /dev/null
+++ b/.github/scripts/functions.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+# USAGE: packageVersion "[PATH]/package.json"
+packageVersion() {
+ local PACKAGE_JSON_FILE=$1
+ VERSION=""
+ while read a b ; do
+ [ "$a" = '"version":' ] && { b="${b%\"*}" ; VERSION="${b#\"}" ; break ; }
+ done < $PACKAGE_JSON_FILE
+ echo $VERSION
+}
+
+githubActionsOutputs() {
+ CURRENT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
+ COMMIT_MESSAGE=$(git log -1 --pretty=%B)
+ echo ::set-output name=tag::$CURRENT_TAG
+ echo ::set-output name=commit_message::$COMMIT_MESSAGE
+}
+
+copyPackagesContent() {
+ shopt -s extglob dotglob
+ cp -rvf "Packages/$PKG_NAME/." "$PKG_ROOT"
+ rm -rf ./Packages
+}
+
+commitAndPush() {
+ # Incrementing LAST_RELEASE_TAG+1.
+ # Keep here just to store the history, and if need this to the future/others repositories
+ #
+ # PS: Keep in mind that not always you would like to increment the git tag version (e.g rewriting with force an existent git tag)
+ # [[ "$LAST_RELEASE_TAG" =~ (.*[^0-9])([0-9]+)$ ]] && LAST_RELEASE_TAG="${BASH_REMATCH[1]}$((${BASH_REMATCH[2]} + 1))";
+
+ RELEASE_VERSION=$(packageVersion "./package.json")
+
+ echo "New version: $RELEASE_VERSION"
+
+ if [[ -d "Samples" ]]; then
+ mv Samples Samples~
+ rm -f Samples.meta
+ fi
+ if [[ -d "Documentation" ]]; then
+ mv Documentation Documentation~
+ rm -f Documentation.meta
+ fi
+ git config --global user.name 'github-bot'
+ git config --global user.email 'github-bot@users.noreply.github.com'
+ git add .
+ git commit --allow-empty -am "$COMMIT_MESSAGE"
+
+ echo $RELEASE_VERSION > VERSION.md~
+ git add VERSION.md~
+ git commit -am "fix: Samples => Samples~ and commit a new version: $RELEASE_VERSION"
+ git push -f -u origin "$PKG_BRANCH"
+}
+
+run() {
+ if [ $1 == "push" ]
+ then
+ commitAndPush
+ elif [ $1 == "movePackagesFolder" ]
+ then
+ copyPackagesContent
+ elif [ $1 == "githubActionsVariables" ]
+ then
+ githubActionsOutputs
+ else
+ echo "[ERROR] INVALID SCRIPT OPERATION"
+ exit 1
+ fi
+}
+
+run $1
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ee987c8..dbaa53a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -2,38 +2,41 @@ name: Unity Package CI
on:
push:
branches:
- - upm-android-haptics
+ - upm-package-embedded
+ repository_dispatch:
+ types: [on-demand-test]
env:
- PKG_ROOT: ./
+ PKG_BRANCH: upm
+ PKG_NAME: com.benoitfreslon.vibration
+ PKG_ROOT: ./
jobs:
split-upm:
- name: Split upm branch (force)
+ name: Create upm package branch (force)
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Split package folder to upm branch
- run: |
- if [ "$PKG_ROOT" == "./" ]
- then
- git checkout -b upm
- else
- git subtree split -P "$PKG_ROOT" -b upm
- fi
- - name: Create samples~ folder
- run: |
- git checkout upm
- if [[ -d "Samples" ]]; then
- git mv Samples Samples~
- rm -f Samples.meta
- git config --global user.name 'github-bot'
- git config --global user.email 'github-bot@users.noreply.github.com'
- git commit -am "fix: Samples => Samples~"
- fi
- - name: Push changes to upm branch
- uses: ad-m/github-push-action@master
- with:
- force: true
- branch: upm
- github_token: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set output git tag and commit message
+ id: vars
+ run: ./.github/scripts/functions.sh githubActionsVariables
+ - name: Check output git variables
+ env:
+ LAST_RELEASE_TAG: ${{ steps.vars.outputs.tag }}
+ COMMIT_MESSAGE: ${{ steps.vars.outputs.commit_message }}
+ run: |
+ echo $LAST_RELEASE_TAG
+ echo $COMMIT_MESSAGE
+ - name: Checkout orphan [${{ env.PKG_BRANCH }}] branch
+ run: |
+ git checkout --orphan "$PKG_BRANCH"
+ shopt -s extglob dotglob
+ rm -rf !(Packages|.github|.git|README.md|README.md.meta|LICENSE|LICENSE.meta|.|..)
+ ls -la ./
+ - name: Move ./Packages content to root
+ run: ./.github/scripts/functions.sh movePackagesFolder
+ - name: Create Samples~ and Documentation~ folders
+ run: ./.github/scripts/functions.sh push
+ env:
+ LAST_RELEASE_TAG: ${{ steps.vars.outputs.tag }}
+ COMMIT_MESSAGE: ${{ steps.vars.outputs.commit_message }}
diff --git a/.gitignore b/.gitignore
index 72c27e4..9f86c35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
-# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
+# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
@@ -14,8 +14,8 @@
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
-# Asset meta data should only be ignored when the corresponding asset is also ignored
-!/[Aa]ssets/**/*.meta
+# Recordings can get excessive in size
+/[Rr]ecordings/
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
@@ -59,6 +59,7 @@ sysinfo.txt
*.apk
*.aab
*.unitypackage
+*.app
# Crashlytics generated file
crashlytics-build.properties
@@ -69,3 +70,220 @@ crashlytics-build.properties
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
+
+# ---------------------
+# Global/JetBrains.gitignore
+# ---------------------
+
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# AWS User-specific
+.idea/**/aws.xml
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# SonarLint plugin
+.idea/sonarlint/
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+# ---------------------
+# Node.gitignore
+# ---------------------
+
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+.pnpm-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional stylelint cache
+.stylelintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variable files
+.env
+.env.development.local
+.env.test.local
+.env.production.local
+.env.local
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# vuepress v2.x temp and cache directory
+.temp
+.cache
+
+# Docusaurus cache and generated files
+.docusaurus
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.*
\ No newline at end of file
diff --git a/.idea/.idea.Vibration/.idea/.gitignore b/.idea/.idea.Vibration/.idea/.gitignore
new file mode 100644
index 0000000..34ffbf2
--- /dev/null
+++ b/.idea/.idea.Vibration/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/projectSettingsUpdater.xml
+/.idea.Vibration.iml
+/modules.xml
+/contentModel.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.idea.Vibration/.idea/vcs.xml b/.idea/.idea.Vibration/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/.idea.Vibration/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 6075de1..a8f196b 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,5 +1,6 @@
{
"recommendations": [
- "xabikos.javascriptsnippets"
+ "xabikos.javascriptsnippets",
+ "visualstudiotoolsforunity.vstuc"
]
}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..da60e25
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,10 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Attach to Unity",
+ "type": "vstuc",
+ "request": "attach"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MobileProjects~/Android/lib/consumer-rules.pro b/Assets/.gitkeep
similarity index 100%
rename from MobileProjects~/Android/lib/consumer-rules.pro
rename to Assets/.gitkeep
diff --git a/MobileProjects~/Android/.idea/.name b/MobileProjects~/Android/.idea/.name
deleted file mode 100644
index 2b9ffe3..0000000
--- a/MobileProjects~/Android/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Unity Vibrations Plugin
\ No newline at end of file
diff --git a/MobileProjects~/Android/.idea/codeStyles/Project.xml b/MobileProjects~/Android/.idea/codeStyles/Project.xml
deleted file mode 100644
index a8fce2b..0000000
--- a/MobileProjects~/Android/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- xmlns:android
-
- ^$
-
-
-
-
-
-
-
-
- xmlns:.*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*:id
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- .*:name
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- name
-
- ^$
-
-
-
-
-
-
-
-
- style
-
- ^$
-
-
-
-
-
-
-
-
- .*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*
-
- http://schemas.android.com/apk/res/android
-
-
- ANDROID_ATTRIBUTE_ORDER
-
-
-
-
-
-
- .*
-
- .*
-
-
- BY_NAME
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MobileProjects~/Android/.idea/codeStyles/codeStyleConfig.xml b/MobileProjects~/Android/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 307554b..0000000
--- a/MobileProjects~/Android/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/MobileProjects~/Android/.idea/jarRepositories.xml b/MobileProjects~/Android/.idea/jarRepositories.xml
deleted file mode 100644
index 52a77b6..0000000
--- a/MobileProjects~/Android/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MobileProjects~/Android/.idea/misc.xml b/MobileProjects~/Android/.idea/misc.xml
deleted file mode 100644
index 8978d23..0000000
--- a/MobileProjects~/Android/.idea/misc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Packages/com.benoitfreslon.vibration/.gitignore b/Packages/com.benoitfreslon.vibration/.gitignore
new file mode 100644
index 0000000..58cbc82
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/.gitignore
@@ -0,0 +1,72 @@
+# This .gitignore file should be placed at the root of your Unity project directory
+#
+# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
+#
+/[Ll]ibrary/
+/[Tt]emp/
+/[Oo]bj/
+/[Bb]uild/
+/[Bb]uilds/
+/[Ll]ogs/
+/[Uu]ser[Ss]ettings/
+
+# MemoryCaptures can get excessive in size.
+# They also could contain extremely sensitive data
+/[Mm]emoryCaptures/
+
+# Recordings can get excessive in size
+/[Rr]ecordings/
+
+# Uncomment this line if you wish to ignore the asset store tools plugin
+# /[Aa]ssets/AssetStoreTools*
+
+# Autogenerated Jetbrains Rider plugin
+/[Aa]ssets/Plugins/Editor/JetBrains*
+
+# Visual Studio cache directory
+.vs/
+
+# Gradle cache directory
+.gradle/
+
+# Autogenerated VS/MD/Consulo solution and project files
+ExportedObj/
+.consulo/
+*.csproj
+*.unityproj
+*.sln
+*.suo
+*.tmp
+*.user
+*.userprefs
+*.pidb
+*.booproj
+*.svd
+*.pdb
+*.mdb
+*.opendb
+*.VC.db
+
+# Unity3D generated meta files
+*.pidb.meta
+*.pdb.meta
+*.mdb.meta
+
+# Unity3D generated file on crash reports
+sysinfo.txt
+
+# Builds
+*.apk
+*.aab
+*.unitypackage
+*.app
+
+# Crashlytics generated file
+crashlytics-build.properties
+
+# Packed Addressables
+/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
+
+# Temporary auto-generated Android Assets
+/[Aa]ssets/[Ss]treamingAssets/aa.meta
+/[Aa]ssets/[Ss]treamingAssets/aa/*
diff --git a/MobileProjects~/Android/.gitignore b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/.gitignore
similarity index 86%
rename from MobileProjects~/Android/.gitignore
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/.gitignore
index eb03a88..b21dd55 100644
--- a/MobileProjects~/Android/.gitignore
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/.gitignore
@@ -1,3 +1,7 @@
+# ---------------------
+# Android.gitignore
+# ---------------------
+
# Gradle files
.gradle/
build/
@@ -32,7 +36,9 @@ google-services.json
# Android Profiling
*.hprof
-# --- Gradle .gitignore ---
+# ---------------------
+# Gradle.gitignore
+# ---------------------
.gradle
**/build/
!src/**/build/
diff --git a/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/README.md b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/README.md
new file mode 100644
index 0000000..de88280
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/README.md
@@ -0,0 +1,7 @@
+# Vibration Plugin: Android Studio project
+
+A `gradle` project created with latest **Android Studio**, in order to test the native implementation features
+outside of game engine project.
+
+> **PS:** This project is useful to implement/test **haptics** that belongs to specific Android API's versions, and deploy to a device
+from Android Studio!
diff --git a/MobileProjects~/Android/app/.gitignore b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/.gitignore
similarity index 87%
rename from MobileProjects~/Android/app/.gitignore
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/.gitignore
index 3543521..796b96d 100644
--- a/MobileProjects~/Android/app/.gitignore
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/.gitignore
@@ -1 +1 @@
-/build
+/build
diff --git a/MobileProjects~/Android/app/build.gradle b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/build.gradle
similarity index 96%
rename from MobileProjects~/Android/app/build.gradle
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/build.gradle
index f3a4200..1d08b83 100644
--- a/MobileProjects~/Android/app/build.gradle
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/build.gradle
@@ -1,68 +1,68 @@
-plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
- id 'kotlin-android'
- id 'kotlin-parcelize'
- id 'kotlin-kapt'
-}
-
-android {
- namespace 'com.benoitfreslon.unity.vibrations.plugin'
- compileSdkVersion 33
-
- defaultConfig {
- applicationId "com.benoitfreslon.unity.vibrations.plugin"
- minSdkVersion 19
- targetSdkVersion 33
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-
- buildFeatures {
- dataBinding true
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
- }
-
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- }
-}
-
-dependencies {
-
- // --- Local modules/libraries ---
- implementation project(path: ':lib')
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
- // --- Core ---
- implementation "androidx.appcompat:appcompat:$appcompat_version"
- implementation "androidx.constraintlayout:constraintlayout:$contraintLayout_version"
- implementation "androidx.core:core-ktx:$androidx_core_version"
-
- // --- ViewModel ---
- implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
-
- // PS: In order to use viewModels() or activityViewModels() delegates on FRAGMENTS,
- // import dependency: "androidx.fragment:fragment-ktx:[$library_version]"
- implementation "androidx.activity:activity-ktx:$activityktx_version"
- implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
- implementation "androidx.lifecycle:lifecycle-common:$lifecycle_version"
-
- // --- Testing ---
- testImplementation "junit:junit:$junit_version"
- androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
- androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
-}
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+ id 'kotlin-android'
+ id 'kotlin-parcelize'
+ id 'kotlin-kapt'
+}
+
+android {
+ namespace 'com.benoitfreslon.unity.vibrations.plugin'
+ compileSdkVersion 33
+
+ defaultConfig {
+ applicationId "com.benoitfreslon.unity.vibrations.plugin"
+ minSdkVersion 19
+ targetSdkVersion 33
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ buildFeatures {
+ dataBinding true
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_17.toString()
+ }
+}
+
+dependencies {
+
+ // --- Local modules/libraries ---
+ implementation project(path: ':lib')
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+
+ // --- Core ---
+ implementation "androidx.appcompat:appcompat:$appcompat_version"
+ implementation "androidx.constraintlayout:constraintlayout:$contraintLayout_version"
+ implementation "androidx.core:core-ktx:$androidx_core_version"
+
+ // --- ViewModel ---
+ implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
+
+ // PS: In order to use viewModels() or activityViewModels() delegates on FRAGMENTS,
+ // import dependency: "androidx.fragment:fragment-ktx:[$library_version]"
+ implementation "androidx.activity:activity-ktx:$activityktx_version"
+ implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
+ implementation "androidx.lifecycle:lifecycle-common:$lifecycle_version"
+
+ // --- Testing ---
+ testImplementation "junit:junit:$junit_version"
+ androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
+}
diff --git a/MobileProjects~/Android/lib/proguard-rules.pro b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/proguard-rules.pro
similarity index 97%
rename from MobileProjects~/Android/lib/proguard-rules.pro
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/proguard-rules.pro
index 6e7ffa9..f1b4245 100644
--- a/MobileProjects~/Android/lib/proguard-rules.pro
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/proguard-rules.pro
@@ -1,21 +1,21 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt
similarity index 96%
rename from MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt
index cbda729..6dba919 100644
--- a/MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/androidTest/java/com/benoitfreslon/unity/vibrations/plugin/ExampleInstrumentedTest.kt
@@ -1,24 +1,24 @@
-package com.benoitfreslon.unity.vibrations.plugin
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.benoitfreslon.unity.vibrations.plugin", appContext.packageName)
- }
-}
+package com.benoitfreslon.unity.vibrations.plugin
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.benoitfreslon.unity.vibrations.plugin", appContext.packageName)
+ }
+}
diff --git a/MobileProjects~/Android/app/src/main/AndroidManifest.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/AndroidManifest.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/AndroidManifest.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/AndroidManifest.xml
index f8e8a55..93d0dd5 100644
--- a/MobileProjects~/Android/app/src/main/AndroidManifest.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/AndroidManifest.xml
@@ -1,22 +1,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainActivity.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainActivity.kt
similarity index 100%
rename from MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainActivity.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainActivity.kt
diff --git a/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainViewModel.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainViewModel.kt
similarity index 100%
rename from MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainViewModel.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/java/com/benoitfreslon/unity/vibrations/plugin/views/MainViewModel.kt
diff --git a/MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 98%
rename from MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
index cc14f03..2b068d1 100644
--- a/MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -1,30 +1,30 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml
index a4f78de..07d5da9 100644
--- a/MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,170 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MobileProjects~/Android/app/src/main/res/layout/activity_main.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/layout/activity_main.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/res/layout/activity_main.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/layout/activity_main.xml
index 23ec88e..8738380 100644
--- a/MobileProjects~/Android/app/src/main/res/layout/activity_main.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/layout/activity_main.xml
@@ -1,61 +1,61 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 98%
rename from MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index a26f6fb..eca70cf 100644
--- a/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 98%
rename from MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index a26f6fb..eca70cf 100644
--- a/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/MobileProjects~/Android/app/src/main/res/values/colors.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/colors.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/res/values/colors.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/colors.xml
index 40f1117..030098f 100644
--- a/MobileProjects~/Android/app/src/main/res/values/colors.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/colors.xml
@@ -1,6 +1,6 @@
-
-
- #6200EE
- #3700B3
- #03DAC5
-
+
+
+ #6200EE
+ #3700B3
+ #03DAC5
+
diff --git a/MobileProjects~/Android/app/src/main/res/values/strings.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/strings.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/res/values/strings.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/strings.xml
index 8231314..5cd22d8 100644
--- a/MobileProjects~/Android/app/src/main/res/values/strings.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/strings.xml
@@ -1,4 +1,4 @@
-
- Unity Vibrations Plugin
- Touch to vibrate!
-
+
+ Unity Vibrations Plugin
+ Touch to vibrate!
+
diff --git a/MobileProjects~/Android/app/src/main/res/values/styles.xml b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/styles.xml
similarity index 97%
rename from MobileProjects~/Android/app/src/main/res/values/styles.xml
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/styles.xml
index 6f19b47..5885930 100644
--- a/MobileProjects~/Android/app/src/main/res/values/styles.xml
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/main/res/values/styles.xml
@@ -1,11 +1,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt
similarity index 95%
rename from MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt
index 334b879..ea9cd79 100644
--- a/MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/app/src/test/java/com/benoitfreslon/unity/vibrations/plugin/ExampleUnitTest.kt
@@ -1,17 +1,17 @@
-package com.benoitfreslon.unity.vibrations.plugin
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
+package com.benoitfreslon.unity.vibrations.plugin
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
diff --git a/MobileProjects~/Android/build.gradle b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/build.gradle
similarity index 96%
rename from MobileProjects~/Android/build.gradle
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/build.gradle
index 5331a17..3926404 100644
--- a/MobileProjects~/Android/build.gradle
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/build.gradle
@@ -1,40 +1,40 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext {
- kotlin_version = '1.9.0'
- appcompat_version = '1.6.1'
- androidx_core_version = '1.10.1'
- fragmentktx_version = '1.5.7'
- activityktx_version = '1.7.2'
- lifecycle_version = '2.6.1'
- contraintLayout_version = '2.1.4'
- junit_version = '4.13.2'
- google_truth_version = '1.1.4'
- androidx_junit_version = '1.1.5'
- androidx_espresso_version = '3.5.1'
- }
- repositories {
- google()
- mavenCentral()
-
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:8.1.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ ext {
+ kotlin_version = '1.9.0'
+ appcompat_version = '1.6.1'
+ androidx_core_version = '1.10.1'
+ fragmentktx_version = '1.5.7'
+ activityktx_version = '1.7.2'
+ lifecycle_version = '2.6.1'
+ contraintLayout_version = '2.1.4'
+ junit_version = '4.13.2'
+ google_truth_version = '1.1.4'
+ androidx_junit_version = '1.1.5'
+ androidx_espresso_version = '3.5.1'
+ }
+ repositories {
+ google()
+ mavenCentral()
+
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:8.1.1'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/MobileProjects~/Android/gradle.properties b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle.properties
similarity index 98%
rename from MobileProjects~/Android/gradle.properties
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle.properties
index 32662c3..9e73ebc 100644
--- a/MobileProjects~/Android/gradle.properties
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle.properties
@@ -1,24 +1,24 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-android.defaults.buildfeatures.buildconfig=true
-android.nonTransitiveRClass=false
-android.nonFinalResIds=false
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+android.defaults.buildfeatures.buildconfig=true
+android.nonTransitiveRClass=false
+android.nonFinalResIds=false
diff --git a/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.jar b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from MobileProjects~/Android/gradle/wrapper/gradle-wrapper.jar
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.jar
diff --git a/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties
similarity index 97%
rename from MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties
index 79422f0..9066c31 100644
--- a/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat May 30 11:32:30 BST 2020
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
+#Sat May 30 11:32:30 BST 2020
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
diff --git a/MobileProjects~/Android/gradlew b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradlew
similarity index 100%
rename from MobileProjects~/Android/gradlew
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradlew
diff --git a/MobileProjects~/Android/gradlew.bat b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradlew.bat
similarity index 96%
rename from MobileProjects~/Android/gradlew.bat
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradlew.bat
index e95643d..f955316 100644
--- a/MobileProjects~/Android/gradlew.bat
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/gradlew.bat
@@ -1,84 +1,84 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/MobileProjects~/Android/lib/.gitignore b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/.gitignore
similarity index 87%
rename from MobileProjects~/Android/lib/.gitignore
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/.gitignore
index 3543521..796b96d 100644
--- a/MobileProjects~/Android/lib/.gitignore
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/.gitignore
@@ -1 +1 @@
-/build
+/build
diff --git a/MobileProjects~/Android/lib/build.gradle b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/build.gradle
similarity index 96%
rename from MobileProjects~/Android/lib/build.gradle
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/build.gradle
index 8c2ae4f..6f70347 100644
--- a/MobileProjects~/Android/lib/build.gradle
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/build.gradle
@@ -1,55 +1,55 @@
-plugins {
- id 'com.android.library'
- id 'org.jetbrains.kotlin.android'
- id 'kotlin-android'
- id 'kotlin-parcelize'
-}
-
-android {
- namespace 'com.benoitfreslon.unity.vibrations.lib'
- compileSdkVersion 33
-
- sourceSets {
- main {
- manifest.srcFile '../../../Runtime/Plugins/Android/AndroidManifest.xml'
- java.srcDirs = ['../../../Runtime/Plugins/Android/java', 'src/main/java']
- res.srcDirs = ['src/main/res', '../../../Runtime/Plugins/Android/res']
- }
- }
-
- defaultConfig {
- minSdkVersion 19
- targetSdkVersion 33
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles 'consumer-rules.pro'
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
- }
-
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- }
-}
-
-dependencies {
-
- // --- Local modules/libraries ---
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
- // --- Testing ---
- testImplementation "junit:junit:$junit_version"
- testImplementation "com.google.truth:truth:$google_truth_version"
- androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
- androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
-}
+plugins {
+ id 'com.android.library'
+ id 'org.jetbrains.kotlin.android'
+ id 'kotlin-android'
+ id 'kotlin-parcelize'
+}
+
+android {
+ namespace 'com.benoitfreslon.unity.vibrations.lib'
+ compileSdkVersion 33
+
+ sourceSets {
+ main {
+ manifest.srcFile '../../../Runtime/Plugins/Android/AndroidManifest.xml'
+ java.srcDirs = ['../../../Runtime/Plugins/Android/java', 'src/main/java']
+ res.srcDirs = ['src/main/res', '../../../Runtime/Plugins/Android/res']
+ }
+ }
+
+ defaultConfig {
+ minSdkVersion 19
+ targetSdkVersion 33
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles 'consumer-rules.pro'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_17.toString()
+ }
+}
+
+dependencies {
+
+ // --- Local modules/libraries ---
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+
+ // --- Testing ---
+ testImplementation "junit:junit:$junit_version"
+ testImplementation "com.google.truth:truth:$google_truth_version"
+ androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
+}
diff --git a/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/consumer-rules.pro b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/consumer-rules.pro
new file mode 100644
index 0000000..e69de29
diff --git a/MobileProjects~/Android/app/proguard-rules.pro b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/proguard-rules.pro
similarity index 97%
rename from MobileProjects~/Android/app/proguard-rules.pro
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/proguard-rules.pro
index 6e7ffa9..f1b4245 100644
--- a/MobileProjects~/Android/app/proguard-rules.pro
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/proguard-rules.pro
@@ -1,21 +1,21 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations.meta b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations.meta
similarity index 100%
rename from MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations.meta
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations.meta
diff --git a/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib.meta b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib.meta
similarity index 100%
rename from MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib.meta
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib.meta
diff --git a/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt
similarity index 96%
rename from MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt
index 2ae5acd..4888aad 100644
--- a/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt
@@ -1,24 +1,24 @@
-package com.benoitfreslon.unity.vibrations.lib
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.benoitfreslon.unity.vibrations.lib.test", appContext.packageName)
- }
-}
+package com.benoitfreslon.unity.vibrations.lib
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.benoitfreslon.unity.vibrations.lib.test", appContext.packageName)
+ }
+}
diff --git a/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt.meta b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt.meta
similarity index 100%
rename from MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt.meta
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/androidTest/java/com/benoitfreslon/unity/vibrations/lib/ExampleInstrumentedTest.kt.meta
diff --git a/MobileProjects~/Android/lib/src/test/java/com/benoitfreslon/unity/vibrations/lib/EnumExtensionsTest.kt b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/test/java/com/benoitfreslon/unity/vibrations/lib/EnumExtensionsTest.kt
similarity index 100%
rename from MobileProjects~/Android/lib/src/test/java/com/benoitfreslon/unity/vibrations/lib/EnumExtensionsTest.kt
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/lib/src/test/java/com/benoitfreslon/unity/vibrations/lib/EnumExtensionsTest.kt
diff --git a/MobileProjects~/Android/settings.gradle b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/settings.gradle
similarity index 96%
rename from MobileProjects~/Android/settings.gradle
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/Android/settings.gradle
index 2da3772..e058c2c 100644
--- a/MobileProjects~/Android/settings.gradle
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/Android/settings.gradle
@@ -1,3 +1,3 @@
-rootProject.name='Unity Vibrations Plugin'
-include ':app'
-include ':lib'
+rootProject.name='Unity Vibrations Plugin'
+include ':app'
+include ':lib'
diff --git a/MobileProjects~/.gitignore b/Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/.gitignore
similarity index 58%
rename from MobileProjects~/.gitignore
rename to Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/.gitignore
index 86de6aa..330d167 100644
--- a/MobileProjects~/.gitignore
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/.gitignore
@@ -2,11 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
-## Build generated
+## User settings
+xcuserdata/
+
+## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
+*.xcscmblueprint
+*.xccheckout
+
+## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
-
-## Various settings
+*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
@@ -15,19 +21,33 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
-xcuserdata/
-
-## Other
-*.moved-aside
-*.xccheckout
-*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
+
+## App packaging
*.ipa
*.dSYM.zip
*.dSYM
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+# Swift Package Manager
+#
+# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
+# Packages/
+# Package.pins
+# Package.resolved
+# *.xcodeproj
+#
+# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
+# hence it is not needed unless you have added a package configuration file to your project
+# .swiftpm
+
+.build/
+
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
@@ -35,18 +55,25 @@ xcuserdata/
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
+#
+# Add this line if you want to avoid checking in source code from the Xcode workspace
+# *.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
-Carthage/Build
+Carthage/Build/
+
+# Accio dependency management
+Dependencies/
+.accio/
# fastlane
#
-# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
-# screenshots whenever they are needed.
+# It is recommended to not store the screenshots in the git repo.
+# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
diff --git a/Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/README.md b/Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/README.md
new file mode 100644
index 0000000..b446302
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/MobileProjects~/iOS/README.md
@@ -0,0 +1,3 @@
+# Vibration Plugin: XCode project
+
+Create here a XCode IOS project, in order to implement/test **haptics** outside of game engine project.
diff --git a/Runtime.meta b/Packages/com.benoitfreslon.vibration/Runtime.meta
similarity index 100%
rename from Runtime.meta
rename to Packages/com.benoitfreslon.vibration/Runtime.meta
diff --git a/Runtime/Plugins.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins.meta
similarity index 77%
rename from Runtime/Plugins.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins.meta
index ec312e3..5c4b1f5 100644
--- a/Runtime/Plugins.meta
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 8a18a006579744750bc5f62a817c99ae
+guid: 47fd18559bcd8db4e8d8c1376c48d697
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Runtime/Plugins/Android.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android.meta
similarity index 100%
rename from Runtime/Plugins/Android.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android.meta
diff --git a/Runtime/Plugins/Android/AndroidManifest.xml b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/AndroidManifest.xml
similarity index 97%
rename from Runtime/Plugins/Android/AndroidManifest.xml
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/AndroidManifest.xml
index a38d278..042e61a 100644
--- a/Runtime/Plugins/Android/AndroidManifest.xml
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/AndroidManifest.xml
@@ -1,4 +1,4 @@
-
-
-
-
+
+
+
+
diff --git a/Runtime/Plugins/Android/AndroidManifest.xml.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/AndroidManifest.xml.meta
similarity index 100%
rename from Runtime/Plugins/Android/AndroidManifest.xml.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/AndroidManifest.xml.meta
diff --git a/Runtime/Plugins/Android/gradleTemplate.properties b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/gradleTemplate.properties
similarity index 100%
rename from Runtime/Plugins/Android/gradleTemplate.properties
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/gradleTemplate.properties
diff --git a/Runtime/Plugins/Android/gradleTemplate.properties.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/gradleTemplate.properties.meta
similarity index 100%
rename from Runtime/Plugins/Android/gradleTemplate.properties.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/gradleTemplate.properties.meta
diff --git a/Runtime/Plugins/Android/java.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java.meta
similarity index 100%
rename from Runtime/Plugins/Android/java.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java.meta
diff --git a/Runtime/Plugins/Android/java/com.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt
similarity index 97%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt
index c819572..960fd19 100644
--- a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt
@@ -1,253 +1,253 @@
-package com.benoitfreslon.unity.vibrations.lib
-
-import android.annotation.TargetApi
-import android.content.Context
-import android.content.ContextWrapper
-import android.media.AudioAttributes
-import android.os.Build
-import android.os.VibrationEffect
-import android.os.Vibrator
-import android.util.Log
-import com.benoitfreslon.unity.vibrations.lib.entities.HapticData
-import com.benoitfreslon.unity.vibrations.lib.entities.HapticPattern
-import com.benoitfreslon.unity.vibrations.lib.entities.VibrationResult
-import com.benoitfreslon.unity.vibrations.lib.enums.VibrationRepeat
-import com.benoitfreslon.unity.vibrations.lib.enums.VibrationType
-import com.benoitfreslon.unity.vibrations.lib.extensions.getByValue
-import com.benoitfreslon.unity.vibrations.lib.extensions.isEffectSupported
-import com.benoitfreslon.unity.vibrations.lib.extensions.isPrimitiveSupported
-import java.util.concurrent.TimeUnit
-
-@Suppress("MemberVisibilityCanBePrivate")
-
-/**
- * **PS:** Pay attention that isn't possible use the new annotation **`androidx.annotation.RequiresApi`** on Unity (<= _2022.3.1_)
- * You will see the error *"Unresolved reference: RequiresApi"* when build for Android platform fro Unity Editor :(
- *
- * Probably, you must use [googlesamples/unity-jar-resolver](https://github.com/googlesamples/unity-jar-resolver) Google plugin in order to
- * add the dependency: `androidx.core:core-ktx:1.10.1`, for instance.
- *
- * If you need restrict any method to an specific Android API, use [android.annotation.TargetApi] annotation instead
- */
-open class Vibration @JvmOverloads constructor(
- context: Context? = null,
- protected var vibrator: Vibrator? = null
-) {
-
- init {
- context?.let {
- if (vibrator == null) {
- @Suppress("DEPRECATION")
- vibrator = context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
-
- HapticData.vibrator = vibrator
- }
- }
- }
-
- @JvmOverloads
- constructor(
- contextWrapper: ContextWrapper,
- vibrator: Vibrator? = null
- ) : this(
- contextWrapper.applicationContext,
- vibrator
- )
-
- @JvmOverloads
- @Suppress("unused")
- fun vibrate(milliseconds: Long? = null, valueType: Int, audioAttributes: AudioAttributes? = null): VibrationResult {
- return vibrate(milliseconds, Enum.getByValue(valueType), audioAttributes)
- }
-
- /**
- * Use this overload method if you prefer call this from Unity with a primitive **`int`** type [milliseconds] parameter, instead of
- * instantiate a `new AndroidJavaObject("java.lang.Long")" from `C#`.
- */
- @JvmOverloads
- @Suppress("unused")
- fun vibrate(milliseconds: Int, valueType: Int, audioAttributes: AudioAttributes? = null): VibrationResult {
- return vibrate(milliseconds.toLong(), Enum.getByValue(valueType), audioAttributes)
- }
-
- @JvmOverloads
- open fun vibrate(milliseconds: Long? = null, type: VibrationType? = null, audioAttributes: AudioAttributes? = null): VibrationResult {
-
- if (!hasVibrator()) {
- return VibrationResult(success = false, type = VibrationResult.Type.VIBRATOR_NOT_SUPPORT)
- }
-
- if (milliseconds == null && type == null) {
- Log.e(TAG, "Time value 'milliseconds' or ${VibrationType::class.qualifiedName} 'type' parameter is required!")
- return VibrationResult(success = false, type = VibrationResult.Type.DURATION_OR_TYPE_REQUIRED)
- }
-
- var duration = milliseconds
- var patternData: HapticPattern? = null
- var hapticData = HapticData(audioAttributes = audioAttributes)
-
- var result = VibrationResult(success = true, type = VibrationResult.Type.OK)
- val resultSuccessMsg = "Vibration with result: '%s'"
-
- if (type != null) {
- hapticData = type.getData(vibrator, duration, audioAttributes) ?: hapticData
- result.vibrationType = type
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-
- if (hapticData.isEmpty) {
- return VibrationResult(
- success = false,
- type = VibrationResult.Type.EFFECT_NOT_SUPPORT,
- vibrationType = type
- )
- } else if (hapticData.effect != null) {
- @Suppress("DEPRECATION")
- vibrator?.vibrate(hapticData.effect, hapticData.audioAttributes)
-
- Log.i(TAG, String.format(resultSuccessMsg, result))
- return result
- }
- }
-
- if (hapticData.effect == null) {
- if (hapticData.fallbackDuration != null) {
- duration = hapticData.fallbackDuration
- }
-
- if (hapticData.patternData != null) {
- patternData = hapticData.patternData
- }
- }
- }
-
- if (patternData != null) {
-
- result = vibrate(patternData.pattern, patternData.repeat, hapticData.audioAttributes)
-
- } else if (duration != null && duration > 0) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-
- @Suppress("DEPRECATION")
- vibrator?.vibrate(duration, hapticData.audioAttributes)
-
- } else {
- @Suppress("DEPRECATION")
- vibrator?.vibrate(duration)
- }
-
- result.duration = duration
- }
-
- Log.i(TAG, String.format(resultSuccessMsg, result))
- return result
- }
-
- @Suppress("unused")
- fun vibrate(duration: Long, timeUnit: TimeUnit): VibrationResult {
- val milliseconds = if (timeUnit != TimeUnit.MILLISECONDS) {
- timeUnit.toMillis(duration)
- } else duration
-
- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- vibrate(milliseconds)
- } else {
- @Suppress("DEPRECATION")
- vibrator?.vibrate(milliseconds)
-
- val result = VibrationResult(
- success = true,
- type = VibrationResult.Type.OK,
- duration = milliseconds
- )
-
- Log.i(TAG, "Vibration with result: '$result'")
-
- result
- }
- }
-
- @Suppress("unused")
- fun vibrateWithTimeUnit(duration: Long, timeUnitValue: String = TimeUnit.SECONDS.name): VibrationResult {
- val timeUnit = enumValueOf(timeUnitValue)
- return vibrate(duration, timeUnit)
- }
-
- /**
- * TODO: Add a parameter to pass a map or data class to pass properties:
- * - wait: A array of Long values with a time to WAIT before each vibrate, in milliseconds
- * - vibrate: A array of Long values with a time to VIBRATE after each wait value, in milliseconds
- */
- @JvmOverloads
- fun vibrate(pattern: LongArray, repeat: Int = -1, audioAttributes: AudioAttributes? = null): VibrationResult {
-
- if (!hasVibrator()) {
- return VibrationResult(success = false, type = VibrationResult.Type.VIBRATOR_NOT_SUPPORT)
- }
-
- val hapticData = HapticData(
- audioAttributes = audioAttributes,
- patternData = HapticPattern(pattern = pattern, repeat = repeat)
- )
-
- val result = VibrationResult(
- success = true,
- type = VibrationResult.Type.OK,
- patternData = hapticData.patternData
- )
-
- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && Build.VERSION.SDK_INT <= Build.VERSION_CODES.O) {
- @Suppress("DEPRECATION")
- vibrator?.vibrate(pattern, repeat, hapticData.audioAttributes)
-
- result
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-
- // Fallback to previously created HapticData.effect from pattern
- val effect = hapticData.effect ?: VibrationEffect.createWaveform(pattern, repeat)
-
- @Suppress("DEPRECATION")
- vibrator?.vibrate(effect, hapticData.audioAttributes)
-
- result
- } else {
- @Suppress("DEPRECATION")
- vibrator?.vibrate(pattern, repeat)
-
- result
- }
- }
-
- fun vibrate(pattern: LongArray, repeat: Int = -1, hapticData: HapticData): VibrationResult {
- return vibrate(pattern, repeat, hapticData.audioAttributes)
- }
-
- @Suppress("unused")
- fun vibrate(pattern: LongArray, repeat: VibrationRepeat = VibrationRepeat.NO_REPEAT, audioAttributes: AudioAttributes? = null): VibrationResult {
- return vibrate(pattern, repeat = repeat.value, audioAttributes)
- }
-
- fun hasVibrator() = vibrator?.hasVibrator() == true
-
- @Suppress("unused")
- fun isEffectSupported(effectId: Int) = vibrator.isEffectSupported(effectId)
- @Suppress("unused")
- fun isPrimitiveSupported(primitiveId: Int) = vibrator.isPrimitiveSupported(primitiveId)
-
- @Suppress("unused")
- @TargetApi(Build.VERSION_CODES.O)
- fun hasAmplitudeControl() = vibrator?.hasAmplitudeControl() == true
-
- @Suppress("unused")
- open fun cancel() {
- if (hasVibrator()) {
- vibrator?.cancel()
- }
- }
-
- companion object {
-
- @JvmStatic
- val TAG: String = "${Vibration::class.simpleName}Plugin"
- }
-}
+package com.benoitfreslon.unity.vibrations.lib
+
+import android.annotation.TargetApi
+import android.content.Context
+import android.content.ContextWrapper
+import android.media.AudioAttributes
+import android.os.Build
+import android.os.VibrationEffect
+import android.os.Vibrator
+import android.util.Log
+import com.benoitfreslon.unity.vibrations.lib.entities.HapticData
+import com.benoitfreslon.unity.vibrations.lib.entities.HapticPattern
+import com.benoitfreslon.unity.vibrations.lib.entities.VibrationResult
+import com.benoitfreslon.unity.vibrations.lib.enums.VibrationRepeat
+import com.benoitfreslon.unity.vibrations.lib.enums.VibrationType
+import com.benoitfreslon.unity.vibrations.lib.extensions.getByValue
+import com.benoitfreslon.unity.vibrations.lib.extensions.isEffectSupported
+import com.benoitfreslon.unity.vibrations.lib.extensions.isPrimitiveSupported
+import java.util.concurrent.TimeUnit
+
+@Suppress("MemberVisibilityCanBePrivate")
+
+/**
+ * **PS:** Pay attention that isn't possible use the new annotation **`androidx.annotation.RequiresApi`** on Unity (<= _2022.3.1_)
+ * You will see the error *"Unresolved reference: RequiresApi"* when build for Android platform fro Unity Editor :(
+ *
+ * Probably, you must use [googlesamples/unity-jar-resolver](https://github.com/googlesamples/unity-jar-resolver) Google plugin in order to
+ * add the dependency: `androidx.core:core-ktx:1.10.1`, for instance.
+ *
+ * If you need restrict any method to an specific Android API, use [android.annotation.TargetApi] annotation instead
+ */
+open class Vibration @JvmOverloads constructor(
+ context: Context? = null,
+ protected var vibrator: Vibrator? = null
+) {
+
+ init {
+ context?.let {
+ if (vibrator == null) {
+ @Suppress("DEPRECATION")
+ vibrator = context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
+
+ HapticData.vibrator = vibrator
+ }
+ }
+ }
+
+ @JvmOverloads
+ constructor(
+ contextWrapper: ContextWrapper,
+ vibrator: Vibrator? = null
+ ) : this(
+ contextWrapper.applicationContext,
+ vibrator
+ )
+
+ @JvmOverloads
+ @Suppress("unused")
+ fun vibrate(milliseconds: Long? = null, valueType: Int, audioAttributes: AudioAttributes? = null): VibrationResult {
+ return vibrate(milliseconds, Enum.getByValue(valueType), audioAttributes)
+ }
+
+ /**
+ * Use this overload method if you prefer call this from Unity with a primitive **`int`** type [milliseconds] parameter, instead of
+ * instantiate a `new AndroidJavaObject("java.lang.Long")" from `C#`.
+ */
+ @JvmOverloads
+ @Suppress("unused")
+ fun vibrate(milliseconds: Int, valueType: Int, audioAttributes: AudioAttributes? = null): VibrationResult {
+ return vibrate(milliseconds.toLong(), Enum.getByValue(valueType), audioAttributes)
+ }
+
+ @JvmOverloads
+ open fun vibrate(milliseconds: Long? = null, type: VibrationType? = null, audioAttributes: AudioAttributes? = null): VibrationResult {
+
+ if (!hasVibrator()) {
+ return VibrationResult(success = false, type = VibrationResult.Type.VIBRATOR_NOT_SUPPORT)
+ }
+
+ if (milliseconds == null && type == null) {
+ Log.e(TAG, "Time value 'milliseconds' or ${VibrationType::class.qualifiedName} 'type' parameter is required!")
+ return VibrationResult(success = false, type = VibrationResult.Type.DURATION_OR_TYPE_REQUIRED)
+ }
+
+ var duration = milliseconds
+ var patternData: HapticPattern? = null
+ var hapticData = HapticData(audioAttributes = audioAttributes)
+
+ var result = VibrationResult(success = true, type = VibrationResult.Type.OK)
+ val resultSuccessMsg = "Vibration with result: '%s'"
+
+ if (type != null) {
+ hapticData = type.getData(vibrator, duration, audioAttributes) ?: hapticData
+ result.vibrationType = type
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+
+ if (hapticData.isEmpty) {
+ return VibrationResult(
+ success = false,
+ type = VibrationResult.Type.EFFECT_NOT_SUPPORT,
+ vibrationType = type
+ )
+ } else if (hapticData.effect != null) {
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(hapticData.effect, hapticData.audioAttributes)
+
+ Log.i(TAG, String.format(resultSuccessMsg, result))
+ return result
+ }
+ }
+
+ if (hapticData.effect == null) {
+ if (hapticData.fallbackDuration != null) {
+ duration = hapticData.fallbackDuration
+ }
+
+ if (hapticData.patternData != null) {
+ patternData = hapticData.patternData
+ }
+ }
+ }
+
+ if (patternData != null) {
+
+ result = vibrate(patternData.pattern, patternData.repeat, hapticData.audioAttributes)
+
+ } else if (duration != null && duration > 0) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(duration, hapticData.audioAttributes)
+
+ } else {
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(duration)
+ }
+
+ result.duration = duration
+ }
+
+ Log.i(TAG, String.format(resultSuccessMsg, result))
+ return result
+ }
+
+ @Suppress("unused")
+ fun vibrate(duration: Long, timeUnit: TimeUnit): VibrationResult {
+ val milliseconds = if (timeUnit != TimeUnit.MILLISECONDS) {
+ timeUnit.toMillis(duration)
+ } else duration
+
+ return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ vibrate(milliseconds)
+ } else {
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(milliseconds)
+
+ val result = VibrationResult(
+ success = true,
+ type = VibrationResult.Type.OK,
+ duration = milliseconds
+ )
+
+ Log.i(TAG, "Vibration with result: '$result'")
+
+ result
+ }
+ }
+
+ @Suppress("unused")
+ fun vibrateWithTimeUnit(duration: Long, timeUnitValue: String = TimeUnit.SECONDS.name): VibrationResult {
+ val timeUnit = enumValueOf(timeUnitValue)
+ return vibrate(duration, timeUnit)
+ }
+
+ /**
+ * TODO: Add a parameter to pass a map or data class to pass properties:
+ * - wait: A array of Long values with a time to WAIT before each vibrate, in milliseconds
+ * - vibrate: A array of Long values with a time to VIBRATE after each wait value, in milliseconds
+ */
+ @JvmOverloads
+ fun vibrate(pattern: LongArray, repeat: Int = -1, audioAttributes: AudioAttributes? = null): VibrationResult {
+
+ if (!hasVibrator()) {
+ return VibrationResult(success = false, type = VibrationResult.Type.VIBRATOR_NOT_SUPPORT)
+ }
+
+ val hapticData = HapticData(
+ audioAttributes = audioAttributes,
+ patternData = HapticPattern(pattern = pattern, repeat = repeat)
+ )
+
+ val result = VibrationResult(
+ success = true,
+ type = VibrationResult.Type.OK,
+ patternData = hapticData.patternData
+ )
+
+ return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && Build.VERSION.SDK_INT <= Build.VERSION_CODES.O) {
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(pattern, repeat, hapticData.audioAttributes)
+
+ result
+ } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+
+ // Fallback to previously created HapticData.effect from pattern
+ val effect = hapticData.effect ?: VibrationEffect.createWaveform(pattern, repeat)
+
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(effect, hapticData.audioAttributes)
+
+ result
+ } else {
+ @Suppress("DEPRECATION")
+ vibrator?.vibrate(pattern, repeat)
+
+ result
+ }
+ }
+
+ fun vibrate(pattern: LongArray, repeat: Int = -1, hapticData: HapticData): VibrationResult {
+ return vibrate(pattern, repeat, hapticData.audioAttributes)
+ }
+
+ @Suppress("unused")
+ fun vibrate(pattern: LongArray, repeat: VibrationRepeat = VibrationRepeat.NO_REPEAT, audioAttributes: AudioAttributes? = null): VibrationResult {
+ return vibrate(pattern, repeat = repeat.value, audioAttributes)
+ }
+
+ fun hasVibrator() = vibrator?.hasVibrator() == true
+
+ @Suppress("unused")
+ fun isEffectSupported(effectId: Int) = vibrator.isEffectSupported(effectId)
+ @Suppress("unused")
+ fun isPrimitiveSupported(primitiveId: Int) = vibrator.isPrimitiveSupported(primitiveId)
+
+ @Suppress("unused")
+ @TargetApi(Build.VERSION_CODES.O)
+ fun hasAmplitudeControl() = vibrator?.hasAmplitudeControl() == true
+
+ @Suppress("unused")
+ open fun cancel() {
+ if (hasVibrator()) {
+ vibrator?.cancel()
+ }
+ }
+
+ companion object {
+
+ @JvmStatic
+ val TAG: String = "${Vibration::class.simpleName}Plugin"
+ }
+}
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/Vibration.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticData.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt
similarity index 78%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt
index f0da803..9c30f45 100644
--- a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt
@@ -30,10 +30,10 @@ data class HapticPattern(
}
override fun toString(): String {
- return "${this::class.simpleName}(\n" +
- "${::pattern.name}=$pattern, \n" +
- "${::amplitude.name}=$amplitude, \n" +
- "${::repeat.name}=$repeat\n" +
- ")\n"
+ return "${this::class.simpleName}(" +
+ "${::pattern.name}=${pattern.contentToString()}, " +
+ "${::amplitude.name}=$amplitude, " +
+ "${::repeat.name}=$repeat" +
+ ")"
}
}
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/HapticPattern.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/README.md.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/entities/VibrationResult.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/IVibrationType.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationRepeat.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/enums/VibrationType.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt
similarity index 96%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt
index 743c7aa..749f908 100644
--- a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt
@@ -27,7 +27,10 @@ import com.benoitfreslon.unity.vibrations.lib.extensions.toVibrationAttrs
* target Android API to 30+. You will always get the runtime exception [NoClassDefFoundError]. That error probably happens
* because of Gradle version that Unity supports.
*
- * See: [Unity: Gradle for Android](https://docs.unity3d.com/Manual/android-gradle-overview.html)
+ * ## References
+ *
+ * - [Android 12: VibratorManager & New Vibration Primitives](https://yggr.medium.com/exploring-android-12-vibratormanager-new-vibration-primitives-e862c95fe938)
+ * - [Unity: Gradle for Android](https://docs.unity3d.com/Manual/android-gradle-overview.html)
*/
@Suppress("unused")
open class VibrationExtended(
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/VibrationExtended.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/entities/HapticDataExtended.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extended/enums/VibrationTypeExtended.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/AudioAttributes.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Enum.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/VibrationAttributes.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/Vibrator.kt.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions.meta
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt
diff --git a/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt.meta
similarity index 100%
rename from Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/Android/java/com/benoitfreslon/unity/vibrations/lib/extensions/functions/VibrationFunctions.kt.meta
diff --git a/Runtime/Plugins/WebGL.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL.meta
similarity index 100%
rename from Runtime/Plugins/WebGL.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL.meta
diff --git a/Runtime/Plugins/WebGL/Lib.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib.meta
similarity index 100%
rename from Runtime/Plugins/WebGL/Lib.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib.meta
diff --git a/Runtime/Plugins/WebGL/Lib/global_functions.jspre b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/global_functions.jspre
similarity index 100%
rename from Runtime/Plugins/WebGL/Lib/global_functions.jspre
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/global_functions.jspre
diff --git a/Runtime/Plugins/WebGL/Lib/global_functions.jspre.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/global_functions.jspre.meta
similarity index 100%
rename from Runtime/Plugins/WebGL/Lib/global_functions.jspre.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/global_functions.jspre.meta
diff --git a/Runtime/Plugins/WebGL/Lib/vibration_library.jspre b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/vibration_library.jspre
similarity index 54%
rename from Runtime/Plugins/WebGL/Lib/vibration_library.jspre
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/vibration_library.jspre
index 6dd978b..22f3668 100644
--- a/Runtime/Plugins/WebGL/Lib/vibration_library.jspre
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/vibration_library.jspre
@@ -2,10 +2,10 @@
* TODO: Create a `VibrationResult` entity in order to return a unique data to console.log() outputs.
* TODO: Add a new method into {@link VibrationType} enum to allow add custom effect types from Unity `C#`
*
-* An external local library Javascript file, containing all reusable code to be called
-* in the `.jslib` file, the methods bridge with `C#`
+* A vanilla JS local library file, containing all reusable code to be called
+* in the `.jslib` file, the methods bridge with the game engine
*
-* **PS:** Pay attention that order of the `.jspre` files are included, depends of the name
+* **PS:** Pay attention that order of the `.jspre` files are included, depends of the name
*
* ### Reference
*
@@ -154,6 +154,9 @@ class VibrationType {
name = "";
value = -1;
duration = 0;
+ /**
+ * @type {number[]}
+ */
pattern = [];
composition = () => {};
@@ -200,10 +203,6 @@ class VibrationType {
static getByValue(value = -1) {
let type = VibrationType.prototype;
-
- if (value < 0) {
- return null;
- }
for (const typeName in VibrationType) {
const vibrationType = VibrationType[typeName];
@@ -222,4 +221,147 @@ class VibrationType {
//#endregion
}
+/**
+ * A vanilla JS vibration **Singleton** class that can be reused on several game engines
+ * @see [Singleton Design Pattern: JavaScript](https://www.freecodecamp.org/news/singleton-design-pattern-with-javascript)
+ * @see [Object.freeze()](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)
+ */
+class Vibration {
+
+ /**
+ * @type {(Vibration|null)}
+ */
+ static instance = null;
+
+ constructor() {
+ // Make sure that any attempts of change on that Singleton class
+ // will throws a "TypeError" exception
+ "use strict";
+
+ if (Vibration.instance instanceof Vibration) {
+ throw new Error("New instance cannot be created!!");
+ }
+
+ Vibration.instance = this;
+
+ Object.freeze(Vibration);
+ }
+
+ /**
+ * Vibrate for a duration of {@link milliseconds} or from a pre-defined {@link VibrationType} effect
+ * @param {number} milliseconds An integer value duration, in milliseconds
+ * @param {number} [typeValue] The vibration effect integer value defined in {@link VibrationType} enum class
+ * @returns {void}
+ */
+ vibrate(milliseconds = 0, typeValue = -2) {
+ const vibrationType = VibrationType.getByValue(typeValue);
+
+ if (vibrationType) {
+
+ if (vibrationType.composition) {
+ try {
+ vibrationType.composition();
+ return;
+ } catch (error) {}
+ }
+
+ milliseconds = vibrationType.duration || vibrationType.pattern || milliseconds;
+ }
+
+ if (milliseconds == null || milliseconds <= 0) {
+ throw new Error("The 'milliseconds' duration should be greater than 0");
+ }
+
+ if (navigator.isVibrateSupported()) {
+ const result = navigator.vibrate(milliseconds);
+
+ if (result) {
+ const millisecondsResult = Array.isArray(milliseconds) ? `[${milliseconds}]` : milliseconds;
+ console.log(`[VibrationPlugin] Vibration with result: '${millisecondsResult}'`);
+ }
+ }
+ }
+
+ /**
+ * Vibrate with a {@link pattern} array, or which one from {@link VibrationType} defined in {@link typeValue} param
+ * @param {number[]} pattern An array of pattern milliseconds durations and pause values to vibrate
+ * @param {number} patternSize The lenght of {@link pattern} array
+ * @param {number} [typeValue] The vibration effect integer value defined in {@link VibrationType} enum class
+ * @param {number} [repeat] A positive integer value to repeat the {@link pattern}, or -1 otherwise (not supported on HTML5/WebGL yet)
+ * @returns {void}
+ * @see {@link VibrationType}
+ * @see {@link navigator.vibrate}
+ * @see [MDN: Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API)
+ * @see [Adding Haptic Feedback to HTML](http://diagramcenter.org/adding-haptic-feedback-to-html.html)
+ * @see [navigator.vibrate more than 1 time](https://stackoverflow.com/a/44618810)
+ */
+ vibrateWithPattern(pattern = [], typeValue = -2, repeat = -1) {
+ const vibrationType = VibrationType.getByValue(typeValue);
+
+ if (vibrationType && vibrationType.composition) {
+ try {
+ vibrationType.composition();
+ return;
+ } catch (error) {}
+ }
+
+ if (vibrationType && vibrationType.pattern && vibrationType.pattern.length > 0) {
+ pattern = vibrationType.pattern;
+ }
+
+ if (navigator.isVibrateSupported()) {
+ let result = false;
+
+ if (repeat > 0) {
+ const repeatMsg = `[VibrationPlugin] Repeat by "${repeat}" times isn't supported yet.\n` +
+ `Prefer use repetition from pattern values (e.g "[500, 300, 500, 300, 500]" => vibrate 3 times)`
+ console.warn(repeatMsg);
+ }
+
+ result = navigator.vibrate(pattern);
+
+ if (result) {
+ console.log(`[VibrationPlugin] Vibration with result: '[${pattern}]'`);
+ }
+ }
+ }
+
+ /**
+ * Cancel the last running vibration
+ * @returns {void}
+ */
+ cancel() {
+ if (!navigator.isVibrateSupported()) {
+ return;
+ }
+
+ const result = navigator.vibrate([]);
+
+ if (result) {
+ console.log('[VibrationPlugin] Cancelled last vibration');
+ }
+ }
+
+ /**
+ * Check if your browser/device supports vibration
+ * @returns {number} 1 if vibration is supported in your browser, 0 otherwise
+ */
+ isSupported() {
+ return !navigator.isVibrateSupported() == true ? 1 : 0;
+ }
+}
+
+/**
+ * @type {Vibration}
+ */
+window.vibration = Object.freeze(new Vibration());
+
+/**
+ * @type {Vibration}
+ */
+Module.vibration = window.vibration;
+
+/**
+ * @type {VibrationType}
+ */
Module.VibrationType = VibrationType;
diff --git a/Runtime/Plugins/WebGL/Lib/vibration_library.jspre.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/vibration_library.jspre.meta
similarity index 100%
rename from Runtime/Plugins/WebGL/Lib/vibration_library.jspre.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/Lib/vibration_library.jspre.meta
diff --git a/Runtime/Plugins/WebGL/README.md b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/README.md
similarity index 100%
rename from Runtime/Plugins/WebGL/README.md
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/README.md
diff --git a/Runtime/Plugins/WebGL/README.md.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/README.md.meta
similarity index 100%
rename from Runtime/Plugins/WebGL/README.md.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/README.md.meta
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/vibration.jslib b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/vibration.jslib
new file mode 100644
index 0000000..042e84f
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/vibration.jslib
@@ -0,0 +1,60 @@
+mergeInto(LibraryManager.library, {
+ /**
+ * Vibrate for a duration of {@link milliseconds} or from a pre-defined {@link VibrationType} effect
+ * @param {number} milliseconds An integer value duration, in milliseconds
+ * @param {number} [typeValue] The vibration effect integer value defined in {@link VibrationType} enum class
+ * @returns {void}
+ */
+ Vibrate: function(milliseconds = 0, typeValue = -2) {
+ Module.vibration.vibrate(milliseconds, typeValue);
+ },
+
+ /**
+ * Vibrate with a {@link pattern} array, or which one from {@link VibrationType} defined in {@link typeValue} param
+ * @param {number[]} pattern An array of pattern milliseconds durations and pause values to vibrate
+ * @param {number} patternSize The lenght of {@link pattern} array
+ * @param {number} [typeValue] The vibration effect integer value defined in {@link VibrationType} enum class
+ * @param {number} [repeat] A positive integer value to repeat the {@link pattern}, or -1 otherwise (not supported on HTML5/WebGL yet)
+ * @returns {void}
+ * @see {@link VibrationType}
+ * @see {@link navigator.vibrate}
+ * @see [MDN: Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API)
+ * @see [Adding Haptic Feedback to HTML](http://diagramcenter.org/adding-haptic-feedback-to-html.html)
+ * @see [navigator.vibrate more than 1 time](https://stackoverflow.com/a/44618810)
+ */
+ VibrateWithPattern: function(pattern = [], patternSize = 0, typeValue = -2, repeat = -1) {
+
+ // Emscripten array conversion only on .jslib file bridge
+ if (typeof pattern == 'number' && pattern > 0 && patternSize > 0 && typeValue < 0) {
+ let intPattern = [];
+ for(var i = 0; i < patternSize; i++) {
+ const value = HEAPU32[(pattern >> 2) + i];
+ intPattern.push(value);
+ }
+
+ if (intPattern && intPattern.length > 0) {
+
+ console.log(`[VibrationPlugin] Converted from: [${pattern}] to pattern: ['${intPattern}]'`);
+ pattern = intPattern;
+ }
+ }
+
+ Module.vibration.vibrateWithPattern(pattern, typeValue, repeat);
+ },
+
+ /**
+ * Cancel the last running vibration
+ * @returns {void}
+ */
+ VibrateCancel: function() {
+ Module.vibration.cancel();
+ },
+
+ /**
+ * Check if your browser/device supports vibration
+ * @returns {number} 1 if vibration is supported in your browser, 0 otherwise
+ */
+ IsVibrateSupported: function() {
+ return Module.vibration.isSupported() == true ? 1 : 0;
+ },
+});
diff --git a/Runtime/Plugins/WebGL/vibration.jslib.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/vibration.jslib.meta
similarity index 100%
rename from Runtime/Plugins/WebGL/vibration.jslib.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/WebGL/vibration.jslib.meta
diff --git a/Runtime/Plugins/iOS.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS.meta
similarity index 100%
rename from Runtime/Plugins/iOS.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS.meta
diff --git a/Runtime/Plugins/iOS/Vibration.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration.meta
similarity index 100%
rename from Runtime/Plugins/iOS/Vibration.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration.meta
diff --git a/Runtime/Plugins/iOS/Vibration/Vibration.h b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.h
similarity index 100%
rename from Runtime/Plugins/iOS/Vibration/Vibration.h
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.h
diff --git a/Runtime/Plugins/iOS/Vibration/Vibration.h.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.h.meta
similarity index 100%
rename from Runtime/Plugins/iOS/Vibration/Vibration.h.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.h.meta
diff --git a/Runtime/Plugins/iOS/Vibration/Vibration.mm b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.mm
similarity index 100%
rename from Runtime/Plugins/iOS/Vibration/Vibration.mm
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.mm
diff --git a/Runtime/Plugins/iOS/Vibration/Vibration.mm.meta b/Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.mm.meta
similarity index 100%
rename from Runtime/Plugins/iOS/Vibration/Vibration.mm.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Plugins/iOS/Vibration/Vibration.mm.meta
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Resources.meta b/Packages/com.benoitfreslon.vibration/Runtime/Resources.meta
new file mode 100644
index 0000000..1caafaa
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Resources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7cc1dc3ae7873c146b9b1f4e28631812
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ScriptableObjects.meta b/Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects.meta
similarity index 100%
rename from ScriptableObjects.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects.meta
diff --git a/ScriptableObjects/ConfigOptions.asset b/Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects/ConfigOptions.asset
similarity index 100%
rename from ScriptableObjects/ConfigOptions.asset
rename to Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects/ConfigOptions.asset
diff --git a/ScriptableObjects/ConfigOptions.asset.meta b/Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects/ConfigOptions.asset.meta
similarity index 100%
rename from ScriptableObjects/ConfigOptions.asset.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Resources/ScriptableObjects/ConfigOptions.asset.meta
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Scripts.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts.meta
new file mode 100644
index 0000000..6671115
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 12e40e6130811d3458313db0d3f75f0c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/Enums.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums.meta
similarity index 100%
rename from Runtime/Enums.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums.meta
diff --git a/Runtime/Enums/Enumeration.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/Enumeration.cs
similarity index 90%
rename from Runtime/Enums/Enumeration.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/Enumeration.cs
index 0cedde4..f0ecc50 100644
--- a/Runtime/Enums/Enumeration.cs
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/Enumeration.cs
@@ -10,17 +10,27 @@ namespace VibrationPlugin.Enums
///
///
/// References
+ ///
///
///
/// PS: Optionally, you can use C# Record implementation ,
@@ -111,5 +121,10 @@ protected static Dictionary FetchAll() =>
{
return enumeration?.Value != other;
}
+
+ public static implicit operator int(Enumeration enumeration)
+ {
+ return enumeration.Value;
+ }
}
}
diff --git a/Runtime/Enums/Enumeration.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/Enumeration.cs.meta
similarity index 100%
rename from Runtime/Enums/Enumeration.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/Enumeration.cs.meta
diff --git a/Runtime/Enums/MobileTimeUnit.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/MobileTimeUnit.cs
similarity index 53%
rename from Runtime/Enums/MobileTimeUnit.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/MobileTimeUnit.cs
index e1b3f90..6836ec5 100644
--- a/Runtime/Enums/MobileTimeUnit.cs
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/MobileTimeUnit.cs
@@ -1,4 +1,6 @@
-namespace VibrationPlugin.Enums
+using System;
+
+namespace VibrationPlugin.Enums
{
///
/// A string Enum using custom Enumeration class pattern
@@ -21,9 +23,35 @@ public class MobileTimeUnit : Enumeration
public static MobileTimeUnit Hours => new(nameof(Hours), 5 );
public static MobileTimeUnit Days => new(nameof(Days), 6 );
- public MobileTimeUnit(string name, int value)
+ protected MobileTimeUnit(string name, int value)
: base(name, value)
{
}
+
+ public virtual int ToMilliseconds(long duration)
+ {
+
+ TimeSpan timeSpan;
+ if (this == Milliseconds)
+ {
+ timeSpan = TimeSpan.FromMilliseconds(duration);
+ } else if (this == Seconds)
+ {
+ timeSpan = TimeSpan.FromSeconds(duration);
+ } else if (this == Minutes)
+ {
+ timeSpan = TimeSpan.FromMinutes(duration);
+ } else if (this == Hours)
+ {
+ timeSpan = TimeSpan.FromHours(duration);
+ } else if (this == Days)
+ {
+ timeSpan = TimeSpan.FromDays(duration);
+ } else {
+ throw new ArgumentException($"The timeunit: '${this}' isn't supported on C# layer");
+ }
+
+ return Convert.ToInt32(timeSpan.TotalMilliseconds);
+ }
}
}
diff --git a/Runtime/Enums/MobileTimeUnit.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/MobileTimeUnit.cs.meta
similarity index 100%
rename from Runtime/Enums/MobileTimeUnit.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/MobileTimeUnit.cs.meta
diff --git a/Runtime/Enums/VibrationRepeat.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationRepeat.cs
similarity index 100%
rename from Runtime/Enums/VibrationRepeat.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationRepeat.cs
diff --git a/Runtime/Enums/VibrationRepeat.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationRepeat.cs.meta
similarity index 100%
rename from Runtime/Enums/VibrationRepeat.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationRepeat.cs.meta
diff --git a/Runtime/Enums/VibrationType.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationType.cs
similarity index 100%
rename from Runtime/Enums/VibrationType.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationType.cs
diff --git a/Runtime/Enums/VibrationType.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationType.cs.meta
similarity index 100%
rename from Runtime/Enums/VibrationType.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Enums/VibrationType.cs.meta
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile.meta
new file mode 100644
index 0000000..2819802
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c9138d707f793374b863e6b795a2d103
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs
new file mode 100644
index 0000000..055b15f
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs
@@ -0,0 +1,71 @@
+using UnityEngine;
+
+namespace VibrationPlugin.Mobile
+{
+ public static class AndroidBuild
+ {
+ #region Properties
+
+ private static int version = -1;
+
+ ///
+ /// Android native SDK_INT version implementation
+ /// from Java static class: android.os.Build.VERSION
+ ///
+ ///
+ public static int Version
+ {
+ get
+ {
+ #if UNITY_ANDROID
+
+ if (version == -1 || version == 0)
+ {
+ using AndroidJavaClass buildVersionClass = new("android.os.Build$VERSION");
+ version = buildVersionClass.GetStatic("SDK_INT");
+ }
+
+ #endif
+
+ return version;
+ }
+ }
+
+ ///
+ /// Player OS version using class
+ /// from Unity C# layer.
+ ///
+ ///
+ /// PS: You can use this property instead of if you prefer
+ /// an Unity C# approach
+ ///
+ ///
+ public static int SystemVersion
+ {
+ get
+ {
+ if (Application.platform == RuntimePlatform.Android
+ && version == -1
+ || version == 0) {
+ string androidVersion = SystemInfo.operatingSystem;
+ int sdkPos = androidVersion.IndexOf( "API-" );
+ version = int.Parse(androidVersion.Substring(sdkPos + 4, 2).ToString());
+ }
+
+ return version;
+ }
+ }
+
+ ///
+ /// The for output texts (e.g Unity UI texts, Log messages...)
+ ///
+ public static string VersionText => Version != -1 ? Version.ToString() : "[Platform unsupported]";
+
+ ///
+ /// An alias of property
+ ///
+ public static int SdkInt => Version;
+
+ #endregion
+ }
+}
diff --git a/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs.meta
new file mode 100644
index 0000000..70c8d0d
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Mobile/AndroidBuild.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0eede6289f43d4b4696ab618b90c6bcd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/Save.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save.meta
similarity index 100%
rename from Runtime/Save.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save.meta
diff --git a/Runtime/Save/Options.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save/Options.cs
similarity index 97%
rename from Runtime/Save/Options.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save/Options.cs
index 476d94f..2fd93c4 100644
--- a/Runtime/Save/Options.cs
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save/Options.cs
@@ -1,15 +1,15 @@
-using System;
-using UnityEngine;
-
-namespace VibrationPlugin.Save
-{
- ///
- /// Inherit this to additional attributes to your specific ScriptableObject
- /// Obs: Add your custom ScriptableObject to VibrationComponent.options
- ///
- [Serializable, CreateAssetMenu(fileName = "ConfigOptions", menuName = "ScriptableObjects/ConfigOptions", order = 1)]
- public class Options : ScriptableObject
- {
- public bool vibration = true;
- }
-}
+using System;
+using UnityEngine;
+
+namespace VibrationPlugin.Save
+{
+ ///
+ /// Inherit this to additional attributes to your specific ScriptableObject
+ /// Obs: Add your custom ScriptableObject to VibrationComponent.options
+ ///
+ [Serializable, CreateAssetMenu(fileName = "ConfigOptions", menuName = "ScriptableObjects/ConfigOptions", order = 1)]
+ public class Options : ScriptableObject
+ {
+ public bool vibration = true;
+ }
+}
diff --git a/Runtime/Save/Options.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save/Options.cs.meta
similarity index 100%
rename from Runtime/Save/Options.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Save/Options.cs.meta
diff --git a/Runtime/Vibration.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Vibration.cs
similarity index 50%
rename from Runtime/Vibration.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Vibration.cs
index 3165ec2..4171edd 100644
--- a/Runtime/Vibration.cs
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Vibration.cs
@@ -6,12 +6,13 @@
//
////////////////////////////////////////////////////////////////////////////////
-using UnityEngine;
#if UNITY_WEBGL || (UNITY_IOS && !UNITY_EDITOR)
+using System;
using System.Runtime.InteropServices;
using System.Collections;
-#endif
using VibrationPlugin.Enums;
+#endif
+using UnityEngine;
namespace VibrationPlugin
{
@@ -42,10 +43,22 @@ public static class Vibration
public static extern void Vibrate(int milliseconds, int typeValue = (int) VibrationType.None);
[DllImport("__Internal")]
- public static extern void VibrateWithPattern(int[] pattern, int patternSize, int typeValue = (int) VibrationType.None);
+ public static extern void VibrateWithPattern(int[] pattern, int patternSize, int typeValue = (int) VibrationType.None, int repeat = -1);
[DllImport("__Internal")]
public static extern void VibrateCancel();
+
+ [DllImport("__Internal")]
+ public static extern int IsVibrateSupported();
+
+ #endif
+
+ #if UNITY_ANDROID && !UNITY_EDITOR
+
+ public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
+ public static AndroidJavaObject currentActivity = unityPlayer.GetStatic("currentActivity");
+ public static AndroidJavaObject vibrator = currentActivity.Call("getSystemService", "vibrator");
+ public static AndroidJavaObject context = currentActivity.Call("getApplicationContext");
#endif
@@ -57,9 +70,9 @@ public static void VibratePop()
#if UNITY_IOS && !UNITY_EDITOR
- _VibratePop ();
+ _VibratePop();
- #elif UNITY_ANDROID && !UNITY_EDITOR
+ #elif (UNITY_ANDROID || UNITY_WEBGL) && !UNITY_EDITOR
Vibrate(15);
@@ -74,11 +87,11 @@ public static void VibratePeek()
{
#if UNITY_IOS && !UNITY_EDITOR
- _VibratePeek ();
+ _VibratePeek();
- #elif UNITY_ANDROID && !UNITY_EDITOR
+ #elif (UNITY_ANDROID || UNITY_WEBGL) && !UNITY_EDITOR
- Vibrate ( 25 );
+ Vibrate(25);
#endif
@@ -91,74 +104,144 @@ public static void VibrateNope()
{
#if UNITY_IOS && !UNITY_EDITOR
- _VibrateNope ();
+ _VibrateNope();
- #elif UNITY_ANDROID && !UNITY_EDITOR
+ #elif (UNITY_ANDROID || UNITY_WEBGL) && !UNITY_EDITOR
- long [] pattern = { 0, 5, 5, 5 };
- Vibrate( pattern, -1 );
+ long[] pattern = { 0, 5, 5, 5 };
+ Vibrate(pattern);
#endif
}
- #if UNITY_ANDROID && !UNITY_EDITOR
-
- public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
- public static AndroidJavaObject currentActivity = unityPlayer.GetStatic("currentActivity");
- public static AndroidJavaObject vibrator = currentActivity.Call("getSystemService", "vibrator");
- public static AndroidJavaObject context = currentActivity.Call("getApplicationContext");
-
- #endif
-
- ///
- /// Only on Android
- /// https://developer.android.com/reference/android/os/Vibrator.html#vibrate(long)
- ///
- public static void Vibrate(long milliseconds)
+ public static void Vibrate()
{
- #if !UNITY_WEBGL
+ // TODO: [Improvement] Implement joystick vibration for PC platform
+ // (e.g A player using a joystick on Steam)
+
+ #if UNITY_ANDROID || UNITY_IOS
- #if UNITY_ANDROID && !UNITY_EDITOR
+ Handheld.Vibrate();
- vibrator.Call("vibrate", milliseconds);
+ #elif UNITY_WEBGL
- #elif UNITY_IOS && !UNITY_EDITOR
+ Vibrate(0, typeValue: (int) VibrationType.Normal);
+
+ #else
+ if (Application.isConsolePlatform)
+ {
Handheld.Vibrate();
+ }
- #endif
#endif
}
+
+ ///
+ /// Only on: Android and WebGL
+ ///
+ ///
+ /// References:
+ ///
+ ///
+ ///
+ public static void Vibrate(long milliseconds)
+ {
+ #if UNITY_ANDROID && !UNITY_EDITOR
- ///
- /// Only on Android
- /// https://proandroiddev.com/using-vibrate-in-android-b0e3ef5d5e07
- ///
- public static void Vibrate(long[] pattern, int repeat)
+ vibrator.Call("vibrate", milliseconds);
+
+ #elif UNITY_IOS && !UNITY_EDITOR
+
+ Handheld.Vibrate();
+
+ #elif UNITY_WEBGL
+
+ int intMilliseconds = Convert.ToInt32(milliseconds);
+ Vibrate(intMilliseconds, typeValue: (int) VibrationType.None);
+
+ #endif
+ }
+
+ ///
+ /// Only on: Android and WebGL
+ ///
+ ///
+ /// References:
+ ///
+ ///
+ ///
+ public static void Vibrate(long[] pattern, int repeat = -1)
{
- #if !UNITY_WEBGL
-
- #if UNITY_ANDROID && !UNITY_EDITOR
+ #if UNITY_ANDROID && !UNITY_EDITOR
- vibrator.Call("vibrate", pattern, repeat);
+ vibrator.Call("vibrate", pattern, repeat);
- #elif UNITY_IOS && !UNITY_EDITOR
+ #elif UNITY_IOS && !UNITY_EDITOR
- Handheld.Vibrate();
+ Handheld.Vibrate();
+
+ #elif UNITY_WEBGL
+
+ var intPattern = Array.ConvertAll(pattern, Convert.ToInt32);
+ VibrateWithPattern(intPattern, intPattern.Length, typeValue: (int) VibrationType.None, repeat);
- #endif
-
#endif
}
- ///
- ///Only on Android
- ///
+ ///
+ /// Only on: Android and WebGL
+ ///
+ ///
+ /// References:
+ ///
+ ///
+ ///
public static void Cancel()
{
#if UNITY_ANDROID && !UNITY_EDITOR
vibrator.Call("cancel");
+
+ #elif UNITY_WEBGL
+
+ VibrateCancel();
#endif
}
@@ -170,18 +253,16 @@ public static bool HasVibrator()
AndroidJavaClass contextClass = new AndroidJavaClass("android.content.Context");
string Context_VIBRATOR_SERVICE = contextClass.GetStatic("VIBRATOR_SERVICE");
AndroidJavaObject systemService = context.Call("getSystemService", Context_VIBRATOR_SERVICE);
- if (systemService.Call("hasVibrator"))
- {
- return true;
- }
- else
- {
- return false;
- }
+
+ return systemService.Call("hasVibrator");
#elif UNITY_IOS && !UNITY_EDITOR
return _HasVibrator ();
+
+ #elif UNITY_WEBGL
+
+ return IsVibrateSupported() == 1;
#else
@@ -189,20 +270,5 @@ public static bool HasVibrator()
#endif
}
-
- public static void Vibrate()
- {
- // TODO: [Improvement] Implement joystick vibration (e.g A player using a joystick on Steam)
- if (Application.isConsolePlatform)
- {
- Handheld.Vibrate();
- }
-
- #if !UNITY_WEBGL && (UNITY_ANDROID || UNITY_IOS)
-
- Handheld.Vibrate();
-
- #endif
- }
}
}
diff --git a/Runtime/Vibration.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/Vibration.cs.meta
similarity index 100%
rename from Runtime/Vibration.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/Vibration.cs.meta
diff --git a/Runtime/VibrationComponent.cs b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/VibrationComponent.cs
similarity index 83%
rename from Runtime/VibrationComponent.cs
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/VibrationComponent.cs
index 9356533..34f66ef 100644
--- a/Runtime/VibrationComponent.cs
+++ b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/VibrationComponent.cs
@@ -1,415 +1,459 @@
-using System.Diagnostics.CodeAnalysis;
-using UnityEngine;
-using VibrationPlugin.Save;
-using VibrationPlugin.Enums;
-
-namespace VibrationPlugin
-{
- public class VibrationComponent : MonoBehaviour
- {
- private const string TAG = nameof(VibrationComponent);
-
- #region Fields
-
- [SerializeField]
- [Tooltip("Enable/Disable vibration for all in the game")]
- protected bool enable = true;
-
- [Header("Save and Load")]
- [SerializeField]
- [Tooltip("ScriptableObject with attributes when enable/disable vibration config (use PlayerPrefs to save from a Menu, for example)")]
- protected Options options;
-
- [Header("Effect")]
- [SerializeField]
- [Tooltip("Vibration duration in seconds")]
- protected long duration = 2;
-
- [SerializeField]
- [Tooltip("The type of vibration effect (SHORT: Android <= 9, LIGHT...HEAVY: Android >= 10)")]
- protected VibrationType type = VibrationType.Light;
-
- #if UNITY_ANDROID
-
- // -- Unity Android core instances --
- protected AndroidJavaClass unityPlayer;
- protected AndroidJavaObject currentActivity;
-
- // -- VibrationPlugin required instances --
- protected AndroidJavaObject vibrationPlugin;
- protected AndroidJavaObject durationLongObj;
-
- #endif
-
- #endregion
-
- #region Properties
-
- public virtual bool IsEnabled
- {
- get
- {
- bool isEnable = enable;
-
- if (options != null)
- {
- isEnable = enable && options.vibration;
- }
-
- return isEnable;
- }
- }
-
- #endregion
-
- #region Unity Events
-
- protected virtual void Awake()
- {
- LoadOptionsSaved();
- }
-
- // Start is called before the first frame update
- [SuppressMessage("ReSharper", "StringLiteralTypo")]
- protected virtual void Start()
- {
- #if UNITY_ANDROID
-
- // PS: If you wish instantiate Kotlin Companion or Java static classes straight-forward from full package name,
- // use the "$" special character (e.g "android.media.AudioAttributes$Builder")
- unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
- currentActivity = unityPlayer.GetStatic("currentActivity");
- vibrationPlugin = new AndroidJavaObject("com.benoitfreslon.unity.vibrations.lib.Vibration", currentActivity);
-
- #endif
- }
-
- protected virtual void OnDisable()
- {
- #if UNITY_ANDROID
-
- if (unityPlayer != null)
- {
- unityPlayer.Dispose();
- unityPlayer = null;
- }
-
- if (currentActivity != null)
- {
- currentActivity.Dispose();
- currentActivity = null;
- }
-
- if (vibrationPlugin != null)
- {
- vibrationPlugin.Dispose();
- vibrationPlugin = null;
- }
-
- if (durationLongObj != null)
- {
- durationLongObj.Dispose();
- durationLongObj = null;
- }
-
- #endif
- }
-
- #endregion
-
- protected virtual void LoadOptionsSaved()
- {
- if (options == null)
- {
- /*
- * Fallback to some Unity versions that ScriptableObjects
- * passed by inspector disappears when plays.
- *
- * Or, if a developer forget to define a custom ScriptableObject
- * to save options on inspector
- */
- options = ScriptableObject.CreateInstance();
- Debug.LogWarningFormat("[{0}] The parameter '{1}' is required to be defined in inspector", TAG, nameof(options));
- }
-
- if (!PlayerPrefs.HasKey(options.GetType().Name))
- {
- return;
- }
-
- var jsonOptions = PlayerPrefs.GetString(options.GetType().Name);
-
- // Not use JsonUtility.FromJson() to ScriptableObject or MonoBehaviour objects
- JsonUtility.FromJsonOverwrite(jsonOptions, options);
- }
-
- ///
- /// Check if the and a
- /// match with "default" values.
- ///
- /// Duration of vibration in milliseconds
- /// to be verified the default value
- ///
- [SuppressMessage("ReSharper", "MemberCanBeMadeStatic.Global")]
- [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
- public bool IsDefault(long? milliseconds = null, VibrationType vibrationType = VibrationType.None)
- {
- return vibrationType == VibrationType.HandheldDefault ||
- (milliseconds is null or 0 && vibrationType == VibrationType.None);
- }
-
- ///
- /// Tiny pop vibration
- ///
- public virtual void VibratePop()
- {
- #if UNITY_IOS && !UNITY_EDITOR
-
- Vibration.VibratePop();
-
- #elif UNITY_ANDROID && !UNITY_EDITOR
-
- Vibrate(15);
-
- #endif
- }
-
- ///
- /// Small peek vibration
- ///
- public virtual void VibratePeek()
- {
- #if UNITY_IOS && !UNITY_EDITOR
-
- Vibration.VibratePeek();
-
- #elif UNITY_ANDROID && !UNITY_EDITOR
-
- Vibrate(25);
-
- #endif
- }
-
- ///
- /// 3 small vibrations
- ///
- public virtual void VibrateNope()
- {
- #if UNITY_IOS && !UNITY_EDITOR
-
- Vibration.VibrateNope();
-
- #elif UNITY_ANDROID && !UNITY_EDITOR
-
- long [] pattern = { 0, 5, 5, 5 };
- Vibrate(pattern, VibrationRepeat.NoRepeat);
-
- #endif
- }
-
- public virtual void Vibrate(long? milliseconds = null, VibrationType vibrationType = VibrationType.None)
- {
- if (!IsEnabled)
- {
- return;
- }
-
- if (IsDefault(milliseconds, vibrationType))
- {
- #if !UNITY_WEBGL
-
- Vibration.Vibrate();
- return;
-
- #endif
- }
-
- #if UNITY_ANDROID
-
- AndroidJNIHelper.debug = true;
-
- if (vibrationPlugin == null)
- {
- return;
- }
-
- durationLongObj = new AndroidJavaObject("java.lang.Long", milliseconds);
- var result = vibrationPlugin.Call("vibrate", durationLongObj, (int) vibrationType);
-
- if (result != null && Debug.isDebugBuild)
- {
- // TODO: Add a UI text in the scene, with the log below when generate a Development Build
- // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
- Debug.Log($"[{TAG}] RESULT: ${result.Call("toString")}, EFFECT: ${vibrationType}");
- }
-
- #elif UNITY_IOS && !UNITY_EDITOR
-
- Vibration.Vibrate();
-
- #elif UNITY_WEBGL
-
- Vibration.Vibrate(Convert.ToInt32(milliseconds), (int) vibrationType);
-
- #endif
- }
-
- public virtual void Vibrate(long milliseconds, MobileTimeUnit timeUnit)
- {
-
- if (!IsEnabled)
- {
- return;
- }
-
- #if UNITY_ANDROID
-
- AndroidJNIHelper.debug = true;
-
- if (vibrationPlugin == null)
- {
- return;
- }
-
- durationLongObj = new AndroidJavaObject("java.lang.Long", milliseconds);
- AndroidJavaObject result = vibrationPlugin.Call("vibrateWithTimeUnit", durationLongObj, timeUnit.ToString());
-
- if (result != null && Debug.isDebugBuild)
- {
- // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
- Debug.Log($"[{TAG}] RESULT: ${result.Call("toString")}, ${nameof(timeUnit)}: ${timeUnit}");
- }
-
- #elif UNITY_IOS && !UNITY_EDITOR
-
- Vibration.Vibrate(milliseconds);
-
- #endif
- }
-
- ///
- /// Only on Android
- ///
- ///
- /// References
- ///
- ///
- public virtual void Vibrate(long[] pattern, VibrationRepeat repeat = VibrationRepeat.NoRepeat)
- {
- if (!IsEnabled)
- {
- return;
- }
-
- #if UNITY_ANDROID
-
- AndroidJNIHelper.debug = true;
-
- if (vibrationPlugin == null)
- {
- return;
- }
-
- AndroidJavaObject result = vibrationPlugin.Call("vibrate", pattern, (int) repeat);
-
- if (result != null && Debug.isDebugBuild)
- {
- // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
- Debug.Log($"[{TAG}] RESULT: ${result.Call("toString")}, ${nameof(pattern)}: ${pattern}, ${nameof(repeat)}: ${repeat}");
- }
-
- #elif UNITY_WEBGL
-
- var intPattern = Array.ConvertAll(pattern, Convert.ToInt32);
- Vibration.VibrateWithPattern(intPattern, intPattern.Length, (int) type);
-
- #elif UNITY_IOS && !UNITY_EDITOR
-
- Vibration.Vibrate();
-
- #endif
- }
-
- public virtual bool HasVibrator()
- {
- #if UNITY_ANDROID
-
- if (vibrationPlugin == null)
- {
- return false;
- }
-
- var hasVibrator = vibrationPlugin.Call("hasVibrator");
- return hasVibrator;
-
- #elif UNITY_IOS
-
- return Vibration.HasVibrator();
-
- #else
-
- return false;
-
- #endif
- }
-
- public virtual bool IsEffectSupported(int effectId)
- {
- #if UNITY_ANDROID
-
- if (vibrationPlugin == null)
- {
- return false;
- }
-
- bool result = vibrationPlugin.Call("isEffectSupported", effectId);
- return result;
-
- #else
-
- return false;
-
- #endif
- }
- public virtual bool IsPrimitiveSupported(int primitiveId)
- {
- #if UNITY_ANDROID
-
- if (vibrationPlugin == null)
- {
- return false;
- }
-
- bool result = vibrationPlugin.Call("isPrimitiveSupported", primitiveId);
- return result;
-
- #else
-
- return false;
-
- #endif
- }
-
- public virtual void Cancel()
- {
- #if UNITY_ANDROID && !UNITY_EDITOR
-
- if (vibrationPlugin == null)
- {
- return;
- }
-
- vibrationPlugin.Call("cancel");
-
- #elif UNITY_WEBGL
-
- Vibration.VibrateCancel();
-
- #endif
- }
- }
-}
+#if UNITY_IOS || UNITY_WEBGL
+using System;
+#endif
+using System.Diagnostics.CodeAnalysis;
+using UnityEngine;
+using VibrationPlugin.Save;
+using VibrationPlugin.Enums;
+
+namespace VibrationPlugin
+{
+ public class VibrationComponent : MonoBehaviour
+ {
+ private const string TAG = nameof(VibrationComponent);
+
+ #region Fields
+
+ [SerializeField]
+ [Tooltip("Enable/Disable vibration for all in the game")]
+ protected bool enable = true;
+
+ [Header("Save and Load")]
+ [SerializeField]
+ [Tooltip("ScriptableObject with attributes when enable/disable vibration config (use PlayerPrefs to save from a Menu, for example)")]
+ protected Options options;
+
+ [Header("Effect")]
+ [SerializeField]
+ [Tooltip("Vibration duration in seconds")]
+ protected long duration = 2;
+
+ [SerializeField]
+ [Tooltip("The type of vibration effect (SHORT: Android <= 9, LIGHT...HEAVY: Android >= 10)")]
+ protected VibrationType type = VibrationType.None;
+
+ #if UNITY_ANDROID
+
+ // -- Unity Android core instances --
+ protected AndroidJavaClass unityPlayer;
+ protected AndroidJavaObject currentActivity;
+
+ // -- VibrationPlugin required instances --
+ protected AndroidJavaObject vibrationPlugin;
+ protected AndroidJavaObject durationLongObj;
+
+ #endif
+
+ #endregion
+
+ #region Properties
+
+ public virtual bool IsEnabled
+ {
+ get
+ {
+ bool isEnable = enable;
+
+ if (options != null)
+ {
+ isEnable = enable && options.vibration;
+ }
+
+ return isEnable;
+ }
+ }
+
+ public long Duration => duration;
+ public VibrationType Type => type;
+
+ #endregion
+
+ #region Unity Events
+
+ protected virtual void Awake()
+ {
+ LoadOptionsSaved();
+ }
+
+ // Start is called before the first frame update
+ [SuppressMessage("ReSharper", "StringLiteralTypo")]
+ protected virtual void Start()
+ {
+ #if UNITY_ANDROID
+
+ // PS: If you wish instantiate Kotlin Companion or Java static classes straight-forward from full package name,
+ // use the "$" special character (e.g "android.media.AudioAttributes$Builder")
+ unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
+ currentActivity = unityPlayer.GetStatic("currentActivity");
+ vibrationPlugin = new AndroidJavaObject("com.benoitfreslon.unity.vibrations.lib.Vibration", currentActivity);
+
+ #endif
+ }
+
+ protected virtual void OnDisable()
+ {
+ #if UNITY_ANDROID
+
+ if (unityPlayer != null)
+ {
+ unityPlayer.Dispose();
+ unityPlayer = null;
+ }
+
+ if (currentActivity != null)
+ {
+ currentActivity.Dispose();
+ currentActivity = null;
+ }
+
+ if (vibrationPlugin != null)
+ {
+ vibrationPlugin.Dispose();
+ vibrationPlugin = null;
+ }
+
+ if (durationLongObj != null)
+ {
+ durationLongObj.Dispose();
+ durationLongObj = null;
+ }
+
+ #endif
+ }
+
+ #endregion
+
+ protected virtual void LoadOptionsSaved()
+ {
+ if (options == null)
+ {
+ /*
+ * Fallback to some Unity versions that ScriptableObjects
+ * passed by inspector disappears when plays.
+ *
+ * Or, if a developer forget to define a custom ScriptableObject
+ * to save options on inspector
+ */
+ options = ScriptableObject.CreateInstance();
+ Debug.LogWarningFormat("[{0}] The parameter '{1}' is required to be defined in inspector", TAG, nameof(options));
+ }
+
+ if (!PlayerPrefs.HasKey(options.GetType().Name))
+ {
+ return;
+ }
+
+ var jsonOptions = PlayerPrefs.GetString(options.GetType().Name);
+
+ // Not use JsonUtility.FromJson() to ScriptableObject or MonoBehaviour objects
+ JsonUtility.FromJsonOverwrite(jsonOptions, options);
+ }
+
+ ///
+ /// Check if the and a
+ /// match with "default" values.
+ ///
+ /// Duration of vibration in milliseconds
+ /// to be verified the default value
+ ///
+ [SuppressMessage("ReSharper", "MemberCanBeMadeStatic.Global")]
+ [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
+ public bool IsDefault(long? milliseconds = null, VibrationType vibrationType = VibrationType.None)
+ {
+ return vibrationType == VibrationType.HandheldDefault ||
+ (milliseconds is null or 0 && vibrationType == VibrationType.None);
+ }
+
+ ///
+ /// Tiny pop vibration
+ ///
+ public virtual void VibratePop()
+ {
+ #if UNITY_IOS && !UNITY_EDITOR
+
+ Vibration.VibratePop();
+
+ #elif UNITY_ANDROID && !UNITY_EDITOR
+
+ Vibrate(15);
+
+ #endif
+ }
+
+ ///
+ /// Small peek vibration
+ ///
+ public virtual void VibratePeek()
+ {
+ #if UNITY_IOS && !UNITY_EDITOR
+
+ Vibration.VibratePeek();
+
+ #elif UNITY_ANDROID && !UNITY_EDITOR
+
+ Vibrate(25);
+
+ #endif
+ }
+
+ ///
+ /// 3 small vibrations
+ ///
+ public virtual void VibrateNope()
+ {
+ #if UNITY_IOS && !UNITY_EDITOR
+
+ Vibration.VibrateNope();
+
+ #elif UNITY_ANDROID && !UNITY_EDITOR
+
+ long [] pattern = { 0, 5, 5, 5 };
+ Vibrate(pattern, VibrationRepeat.NoRepeat);
+
+ #endif
+ }
+
+ public virtual void Vibrate(long? milliseconds = null, VibrationType vibrationType = VibrationType.None)
+ {
+ if (!IsEnabled)
+ {
+ return;
+ }
+
+ if (milliseconds == null)
+ {
+ milliseconds = duration;
+ }
+
+ if (vibrationType == VibrationType.None)
+ {
+ vibrationType = type;
+ }
+
+ if (IsDefault(milliseconds, vibrationType))
+ {
+ #if !UNITY_WEBGL
+
+ Vibration.Vibrate();
+ return;
+
+ #endif
+ }
+
+ #if UNITY_ANDROID
+
+ AndroidJNIHelper.debug = true;
+
+ if (vibrationPlugin == null)
+ {
+ return;
+ }
+
+ durationLongObj = new AndroidJavaObject("java.lang.Long", milliseconds);
+ var result = vibrationPlugin.Call("vibrate", durationLongObj, (int) vibrationType);
+
+ if (result != null && Debug.isDebugBuild)
+ {
+ // TODO: Add a UI text in the scene, with the log below when generate a Development Build
+ // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
+ Debug.Log($"[{TAG}] EFFECT: ${vibrationType}, RESULT: ${result.Call("toString")}");
+ }
+
+ #elif UNITY_IOS && !UNITY_EDITOR
+
+ Vibration.Vibrate();
+
+ #elif UNITY_WEBGL
+
+ int intMilliseconds = Convert.ToInt32(milliseconds);
+ Vibration.Vibrate(intMilliseconds, (int) vibrationType);
+
+ #endif
+ }
+
+ public virtual void Vibrate(long duration, MobileTimeUnit timeUnit)
+ {
+
+ if (!IsEnabled)
+ {
+ return;
+ }
+
+ #if UNITY_ANDROID
+
+ AndroidJNIHelper.debug = true;
+
+ if (vibrationPlugin == null)
+ {
+ return;
+ }
+
+ durationLongObj = new AndroidJavaObject("java.lang.Long", duration);
+ AndroidJavaObject result = vibrationPlugin.Call("vibrateWithTimeUnit", durationLongObj, timeUnit.ToString());
+
+ if (result != null && Debug.isDebugBuild)
+ {
+ // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
+ Debug.Log($"[{TAG}] RESULT: ${result.Call("toString")}, ${nameof(timeUnit)}: ${timeUnit}");
+ }
+
+ #elif UNITY_IOS || UNITY_WEBGL
+
+ // Convert to milliseconds from "MobileTimeUnit" defined in "timeUnit" parameter
+ if (timeUnit != MobileTimeUnit.Milliseconds)
+ {
+ duration = timeUnit.ToMilliseconds(duration);
+ }
+
+ Vibration.Vibrate(duration);
+
+ #endif
+ }
+
+ ///
+ /// Only on Android
+ ///
+ ///
+ /// References
+ ///
+ ///
+ public virtual void Vibrate(long[] pattern, VibrationRepeat repeat = VibrationRepeat.NoRepeat)
+ {
+ if (!IsEnabled)
+ {
+ return;
+ }
+
+ #if UNITY_ANDROID
+
+ AndroidJNIHelper.debug = true;
+
+ if (vibrationPlugin == null)
+ {
+ return;
+ }
+
+ AndroidJavaObject result = vibrationPlugin.Call("vibrate", pattern, (int) repeat);
+
+ if (result != null && Debug.isDebugBuild)
+ {
+ // To see this log, connect your phone with the USB cable, open Android Studio => LogCat panel
+ Debug.Log($"[{TAG}] RESULT: ${result.Call("toString")}, ${nameof(pattern)}: ${pattern}, ${nameof(repeat)}: ${repeat}");
+ }
+
+ #elif UNITY_WEBGL
+
+ var intPattern = Array.ConvertAll(pattern, Convert.ToInt32);
+ Vibration.VibrateWithPattern(intPattern, intPattern.Length, (int) type);
+
+ #elif UNITY_IOS && !UNITY_EDITOR
+
+ Vibration.Vibrate();
+
+ #endif
+ }
+
+ public virtual bool HasVibrator()
+ {
+ #if UNITY_ANDROID
+
+ if (vibrationPlugin == null)
+ {
+ return false;
+ }
+
+ var hasVibrator = vibrationPlugin.Call("hasVibrator");
+ return hasVibrator;
+
+ #elif UNITY_IOS || UNITY_WEBGL
+
+ return Vibration.HasVibrator();
+
+ #else
+
+ return false;
+
+ #endif
+ }
+
+ ///
+ /// Only on: Android
+ ///
+ ///
+ /// A effect integer value ID, based in Android effects
+ ///
+ /// See:
+ /// Developer Android: VibrationEffect
+ ///
+ /// True, if an is supported or False otherwise
+ public virtual bool IsEffectSupported(int effectId)
+ {
+ #if UNITY_ANDROID
+
+ if (vibrationPlugin == null)
+ {
+ return false;
+ }
+
+ bool result = vibrationPlugin.Call("isEffectSupported", effectId);
+ return result;
+
+ #else
+
+ return false;
+
+ #endif
+ }
+
+ ///
+ /// Only on: Android
+ ///
+ ///
+ /// A primitive integer value ID, based in Android Composition primitives
+ ///
+ /// See:
+ /// Developer Android: VibrationEffect.Composition
+ ///
+ /// True, if a is supported or False otherwise
+ public virtual bool IsPrimitiveSupported(int primitiveId)
+ {
+ #if UNITY_ANDROID
+
+ if (vibrationPlugin == null)
+ {
+ return false;
+ }
+
+ bool result = vibrationPlugin.Call("isPrimitiveSupported", primitiveId);
+ return result;
+
+ #else
+
+ return false;
+
+ #endif
+ }
+
+ public virtual void Cancel()
+ {
+ #if UNITY_ANDROID && !UNITY_EDITOR
+
+ if (vibrationPlugin == null)
+ {
+ return;
+ }
+
+ vibrationPlugin.Call("cancel");
+
+ #else
+
+ Vibration.Cancel();
+
+ #endif
+ }
+ }
+}
diff --git a/Runtime/VibrationComponent.cs.meta b/Packages/com.benoitfreslon.vibration/Runtime/Scripts/VibrationComponent.cs.meta
similarity index 100%
rename from Runtime/VibrationComponent.cs.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Scripts/VibrationComponent.cs.meta
diff --git a/Runtime/Vibration.asmdef b/Packages/com.benoitfreslon.vibration/Runtime/Vibration.asmdef
similarity index 100%
rename from Runtime/Vibration.asmdef
rename to Packages/com.benoitfreslon.vibration/Runtime/Vibration.asmdef
diff --git a/Runtime/Vibration.asmdef.meta b/Packages/com.benoitfreslon.vibration/Runtime/Vibration.asmdef.meta
similarity index 100%
rename from Runtime/Vibration.asmdef.meta
rename to Packages/com.benoitfreslon.vibration/Runtime/Vibration.asmdef.meta
diff --git a/Samples.meta b/Packages/com.benoitfreslon.vibration/Samples.meta
similarity index 100%
rename from Samples.meta
rename to Packages/com.benoitfreslon.vibration/Samples.meta
diff --git a/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref b/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref
new file mode 100644
index 0000000..5d9f6dc
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref
@@ -0,0 +1,3 @@
+{
+ "reference": "GUID:742764898e7ebba4c94b9d41bbb0f72c"
+}
\ No newline at end of file
diff --git a/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref.meta b/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref.meta
new file mode 100644
index 0000000..025d2ea
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Samples/Vibration.Samples.asmref.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: afd5c7818224ed349bdeefa89cc18d30
+AssemblyDefinitionReferenceImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Samples/VibrationExample.meta b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample.meta
similarity index 100%
rename from Samples/VibrationExample.meta
rename to Packages/com.benoitfreslon.vibration/Samples/VibrationExample.meta
diff --git a/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.cs b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.cs
new file mode 100644
index 0000000..7abc830
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.cs
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// @author Benoît Freslon @benoitfreslon
+// https://github.com/BenoitFreslon/Vibration
+// https://benoitfreslon.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using UnityEngine;
+using UnityEngine.UI;
+using VibrationPlugin.Mobile;
+
+namespace VibrationPlugin.Samples
+{
+ [DisallowMultipleComponent]
+ public class VibrationExample : MonoBehaviour
+ {
+ public Text inputTime;
+ public Text inputPattern;
+ public Text inputRepeat;
+ public Text txtAndroidVersion;
+
+ // Use this for initialization
+ void Start ()
+ {
+ Init();
+ }
+
+ public void Init()
+ {
+ if (Debug.isDebugBuild)
+ {
+ Debug.Log($"Application.isMobilePlatform: {Application.isMobilePlatform}");
+ }
+
+ if (txtAndroidVersion != null)
+ {
+ txtAndroidVersion.text = $"Android Version: {AndroidBuild.VersionText}";
+ }
+ }
+
+ public void TapVibrate()
+ {
+ Vibration.Vibrate();
+ }
+
+ public void TapVibrateCustom()
+ {
+ Vibration.Vibrate(milliseconds: int.Parse(inputTime.text));
+ }
+
+ public void TapVibratePattern()
+ {
+ string[] patterns = inputPattern.text.Replace(" ", "" ).Split(',');
+ long[] longs = Array.ConvertAll(patterns, long.Parse);
+
+ Debug.Log(longs.Length);
+
+ Vibration.Vibrate(pattern: longs, repeat: int.Parse(inputRepeat.text));
+ }
+
+ public void TapCancelVibrate()
+ {
+ Vibration.Cancel();
+ }
+
+ public void TapPopVibrate()
+ {
+ Vibration.VibratePop();
+ }
+
+ public void TapPeekVibrate()
+ {
+ Vibration.VibratePeek();
+ }
+
+ public void TapNopeVibrate()
+ {
+ Vibration.VibrateNope();
+ }
+ }
+}
diff --git a/Samples/VibrationExample/VibrationExample.cs.meta b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.cs.meta
similarity index 100%
rename from Samples/VibrationExample/VibrationExample.cs.meta
rename to Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.cs.meta
diff --git a/Samples/VibrationExample/VibrationExample.unity b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity
similarity index 96%
rename from Samples/VibrationExample/VibrationExample.unity
rename to Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity
index 6321a0f..18de695 100644
--- a/Samples/VibrationExample/VibrationExample.unity
+++ b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity
@@ -43,7 +43,7 @@ RenderSettings:
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
- serializedVersion: 11
+ serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
@@ -98,13 +98,13 @@ LightmapSettings:
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
- m_UseShadowmask: 1
+ m_LightingSettings: {fileID: 4890085278179872738, guid: cb6d58191ef8fb84f8453061d8f28ba8, type: 2}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
- serializedVersion: 2
+ serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
@@ -117,7 +117,9 @@ NavMeshSettings:
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
- accuratePlacement: 0
+ buildHeightMesh: 0
+ maxJobWorkers: 0
+ preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
@@ -149,6 +151,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 859354940}
m_RootOrder: 0
@@ -173,6 +176,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -227,6 +231,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1670138780}
m_RootOrder: 0
@@ -251,6 +256,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -305,6 +311,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 345238854}
m_RootOrder: 0
@@ -329,6 +336,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -383,6 +391,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 466977093}
m_RootOrder: 0
@@ -407,6 +416,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -462,6 +472,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9998401, y: 0.9998401, z: 0.9998401}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 182228032}
m_Father: {fileID: 2050238279}
@@ -486,6 +497,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -516,6 +528,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapPopVibrate
m_Mode: 1
m_Arguments:
@@ -541,6 +554,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -622,6 +636,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
+ m_PresetInfoIsWorld: 0
--- !u!223 &466977092
Canvas:
m_ObjectHideFlags: 0
@@ -639,7 +654,9 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
+ m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
+ m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -653,6 +670,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 324698976}
- {fileID: 617596108}
@@ -710,6 +728,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 963626551}
m_RootOrder: 0
@@ -734,6 +753,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -789,6 +809,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1422130450}
m_Father: {fileID: 466977093}
@@ -813,6 +834,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -843,6 +865,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapVibrate
m_Mode: 1
m_Arguments:
@@ -868,6 +891,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -919,6 +943,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.00016, y: 1.00016, z: 1.00016}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 646267802}
- {fileID: 1645088209}
@@ -944,6 +969,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -980,7 +1006,10 @@ MonoBehaviour:
m_HideMobileInput: 0
m_CharacterValidation: 0
m_CharacterLimit: 30
- m_OnEndEdit:
+ m_OnSubmit:
+ m_PersistentCalls:
+ m_Calls: []
+ m_OnDidEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
@@ -993,6 +1022,7 @@ MonoBehaviour:
m_CaretBlinkRate: 0.85
m_CaretWidth: 1
m_ReadOnly: 0
+ m_ShouldActivateOnSelect: 1
--- !u!114 &622675460
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1008,6 +1038,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1058,6 +1089,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 622675458}
m_RootOrder: 0
@@ -1082,6 +1114,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1134,6 +1167,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2015335722}
- {fileID: 1764865174}
@@ -1176,6 +1210,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99984, y: 0.99984, z: 0.99984}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2032679025}
m_RootOrder: 0
@@ -1200,6 +1235,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1259,6 +1295,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1295,6 +1332,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99983996, y: 0.99983996, z: 0.99983996}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 705145219}
m_RootOrder: 4
@@ -1334,6 +1372,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7432647}
m_Father: {fileID: 1670138780}
@@ -1378,6 +1417,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -1408,6 +1448,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapCancelVibrate
m_Mode: 1
m_Arguments:
@@ -1433,6 +1474,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1483,6 +1525,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1036050925}
m_RootOrder: 1
@@ -1507,6 +1550,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1562,6 +1606,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.00016, y: 1.00016, z: 1.00016}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 568472777}
- {fileID: 1598618548}
@@ -1587,6 +1632,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -1623,7 +1669,10 @@ MonoBehaviour:
m_HideMobileInput: 0
m_CharacterValidation: 0
m_CharacterLimit: 4
- m_OnEndEdit:
+ m_OnSubmit:
+ m_PersistentCalls:
+ m_Calls: []
+ m_OnDidEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
@@ -1636,6 +1685,7 @@ MonoBehaviour:
m_CaretBlinkRate: 0.85
m_CaretWidth: 1
m_ReadOnly: 0
+ m_ShouldActivateOnSelect: 1
--- !u!114 &963626553
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1651,6 +1701,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1702,6 +1753,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.00016, y: 1.00016, z: 1.00016}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1548069567}
- {fileID: 951333922}
@@ -1727,6 +1779,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -1763,7 +1816,10 @@ MonoBehaviour:
m_HideMobileInput: 0
m_CharacterValidation: 1
m_CharacterLimit: 4
- m_OnEndEdit:
+ m_OnSubmit:
+ m_PersistentCalls:
+ m_Calls: []
+ m_OnDidEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
@@ -1776,6 +1832,7 @@ MonoBehaviour:
m_CaretBlinkRate: 0.85
m_CaretWidth: 1
m_ReadOnly: 0
+ m_ShouldActivateOnSelect: 1
--- !u!114 &1036050927
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1791,6 +1848,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1841,6 +1899,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1120494234}
m_RootOrder: 0
@@ -1865,6 +1924,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -1920,6 +1980,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9998401, y: 0.9998401, z: 0.9998401}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1120240017}
m_Father: {fileID: 2050238279}
@@ -1944,6 +2005,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -1974,6 +2036,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapPeekVibrate
m_Mode: 1
m_Arguments:
@@ -1999,6 +2062,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2049,6 +2113,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1679101618}
m_RootOrder: 0
@@ -2073,6 +2138,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2127,6 +2193,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1427728649}
m_RootOrder: 0
@@ -2151,6 +2218,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2205,6 +2273,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 617596108}
m_RootOrder: 0
@@ -2229,6 +2298,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2284,6 +2354,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99984, y: 0.99984, z: 0.99984}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1380144077}
m_Father: {fileID: 2050238279}
@@ -2308,6 +2379,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -2338,6 +2410,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapNopeVibrate
m_Mode: 1
m_Arguments:
@@ -2363,6 +2436,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2397,7 +2471,7 @@ GameObject:
- component: {fileID: 1508091272}
- component: {fileID: 1508091271}
m_Layer: 5
- m_Name: AndroidOnly
+ m_Name: AndroidWebGLOnly
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -2413,6 +2487,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99983996, y: 0.99983996, z: 0.99983996}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 705145219}
m_RootOrder: 2
@@ -2437,6 +2512,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2454,7 +2530,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
- m_Text: Android Only
+ m_Text: Android/WebGL Only
--- !u!222 &1508091272
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -2491,6 +2567,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1036050925}
m_RootOrder: 0
@@ -2515,6 +2592,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2571,6 +2649,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
+ m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
@@ -2603,6 +2682,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
@@ -2640,6 +2720,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2676,6 +2757,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 963626551}
m_RootOrder: 1
@@ -2713,6 +2795,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 622675458}
m_RootOrder: 1
@@ -2737,6 +2820,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -2790,6 +2874,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9995999, y: 0.9995999, z: 0.9995999}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 152048750}
- {fileID: 963626551}
@@ -2827,6 +2912,7 @@ MonoBehaviour:
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
--- !u!1 &1679101617
GameObject:
m_ObjectHideFlags: 0
@@ -2857,6 +2943,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9998401, y: 0.9998401, z: 0.9998401}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1330219603}
m_Father: {fileID: 1764865174}
@@ -2901,6 +2988,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -2931,6 +3019,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapVibratePattern
m_Mode: 1
m_Arguments:
@@ -2956,6 +3045,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -3005,6 +3095,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99983996, y: 0.99983996, z: 0.99983996}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 622675458}
- {fileID: 1679101618}
@@ -3041,6 +3132,7 @@ MonoBehaviour:
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
--- !u!1 &1873484376
GameObject:
m_ObjectHideFlags: 0
@@ -3090,9 +3182,17 @@ Camera:
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
+ m_Iso: 200
+ m_ShutterSpeed: 0.005
+ m_Aperture: 16
+ m_FocusDistance: 10
+ m_FocalLength: 50
+ m_BladeCount: 5
+ m_Curvature: {x: 2, y: 11}
+ m_BarrelClipping: 0.25
+ m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
- m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -3129,6 +3229,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -3162,6 +3263,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9998401, y: 0.9998401, z: 0.9998401}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2068006127}
m_Father: {fileID: 2015335722}
@@ -3186,6 +3288,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
+ m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
@@ -3216,6 +3319,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 466977094}
+ m_TargetAssemblyTypeName:
m_MethodName: TapVibrateCustom
m_Mode: 1
m_Arguments:
@@ -3241,6 +3345,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -3290,6 +3395,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99983996, y: 0.99983996, z: 0.99983996}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1036050925}
- {fileID: 2010532245}
@@ -3326,6 +3432,7 @@ MonoBehaviour:
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
--- !u!1 &2032679024
GameObject:
m_ObjectHideFlags: 0
@@ -3352,6 +3459,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 775280439}
- {fileID: 2050238279}
@@ -3390,6 +3498,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 345238854}
- {fileID: 1120494234}
@@ -3427,6 +3536,7 @@ MonoBehaviour:
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
--- !u!1 &2068006126
GameObject:
m_ObjectHideFlags: 0
@@ -3455,6 +3565,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2010532245}
m_RootOrder: 0
@@ -3479,6 +3590,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
diff --git a/Samples/VibrationExample/VibrationExample.unity.meta b/Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity.meta
similarity index 100%
rename from Samples/VibrationExample/VibrationExample.unity.meta
rename to Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity.meta
diff --git a/Packages/com.benoitfreslon.vibration/Tests.meta b/Packages/com.benoitfreslon.vibration/Tests.meta
new file mode 100644
index 0000000..59c11c7
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 12db315ecf0fe89469be55c89b75728e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.benoitfreslon.vibration/Tests/Editor.meta b/Packages/com.benoitfreslon.vibration/Tests/Editor.meta
new file mode 100644
index 0000000..5a1d67c
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8790a936121a4f94fa948c6eed7b831c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs b/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs
new file mode 100644
index 0000000..4bbdb8e
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs
@@ -0,0 +1,91 @@
+using System;
+using NUnit.Framework;
+using VibrationPlugin.Enums;
+
+namespace VibrationPlugin.EditorTests
+{
+ public class MobileTimeUnitTest
+ {
+
+ [Test, Description("Test if a time unit defined as Milliseconds returns a duration in milliseconds")]
+ public void TestToMillisecondsReturnsCorrectValueForMilliseconds()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Milliseconds;
+ long duration = 1000;
+
+ // Act
+ int milliseconds = timeUnit.ToMilliseconds(duration);
+
+ // Assert
+ Assert.AreEqual(1000, milliseconds);
+ }
+
+ [Test, Description("Test if a time unit defined as Seconds returns a duration in milliseconds")]
+ public void TestToMillisecondsReturnsCorrectValueForSeconds()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Seconds;
+ long duration = 1;
+
+ // Act
+ int milliseconds = timeUnit.ToMilliseconds(duration);
+
+ // Assert
+ Assert.AreEqual(1000, milliseconds);
+ }
+
+ [Test, Description("Test if a time unit defined as Minutes returns a duration in milliseconds")]
+ public void TestToMillisecondsReturnsCorrectValueForMinutes()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Minutes;
+ long duration = 1;
+
+ // Act
+ int milliseconds = timeUnit.ToMilliseconds(duration);
+
+ // Assert
+ Assert.AreEqual(60000, milliseconds);
+ }
+
+ [Test, Description("Test if a time unit defined as Hours returns a duration in milliseconds")]
+ public void TestToMillisecondsReturnsCorrectValueForHours()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Hours;
+ long duration = 1;
+
+ // Act
+ int milliseconds = timeUnit.ToMilliseconds(duration);
+
+ // Assert
+ Assert.AreEqual(3600000, milliseconds);
+ }
+
+ [Test, Description("Test if a time unit defined as Days returns a duration in milliseconds")]
+ public void TestToMillisecondsReturnsCorrectValueForDays()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Days;
+ long duration = 1;
+
+ // Act
+ int milliseconds = timeUnit.ToMilliseconds(duration);
+
+ // Assert
+ Assert.AreEqual(86400000, milliseconds);
+ }
+
+ [Test, Description("Test if an unsupported time unit throws an exception when try convert to milliseconds")]
+ public void TestToMillisecondsThrowsArgumentExceptionForUnsupportedTimeUnit()
+ {
+ // Arrange
+ MobileTimeUnit timeUnit = MobileTimeUnit.Nanoseconds;
+ long duration = 1;
+
+ // Act
+ Assert.Throws(() => timeUnit.ToMilliseconds(duration));
+ }
+ }
+}
diff --git a/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs.meta b/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs.meta
new file mode 100644
index 0000000..6db1ff8
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests/Editor/MobileTimeUnitTest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6c1f04dd2deda7d4fb7929ef02c36eec
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef b/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef
new file mode 100644
index 0000000..89c57c8
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef
@@ -0,0 +1,21 @@
+{
+ "name": "Vibration.Editor.Tests",
+ "rootNamespace": "VibrationPlugin.EditorTests",
+ "references": [
+ "GUID:742764898e7ebba4c94b9d41bbb0f72c"
+ ],
+ "optionalUnityReferences": [
+ "TestAssemblies"
+ ],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
diff --git a/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef.meta b/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef.meta
new file mode 100644
index 0000000..a7d4b65
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/Tests/Editor/Vibration.Editor.Tests.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9fe5c3dce44d8614686489322cdbcdc0
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.benoitfreslon.vibration/package.json b/Packages/com.benoitfreslon.vibration/package.json
new file mode 100644
index 0000000..de5cb8d
--- /dev/null
+++ b/Packages/com.benoitfreslon.vibration/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "com.benoitfreslon.vibration",
+ "author": "Benoit Freslon, AminSojoudi, SH42913",
+ "displayName": "Vibration",
+ "description": "Native free plugin for Unity for iOS and Android. Use custom vibrations on mobile.",
+ "unity": "2019.3",
+ "version": "0.1.0",
+ "keywords": [],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/BenoitFreslon/Vibration"
+ },
+ "samples": [
+ {
+ "displayName": "Vibration Example",
+ "description": "A basic scene with vibration example",
+ "path": "Samples~/VibrationExample"
+ }
+ ]
+}
diff --git a/package.json.meta b/Packages/com.benoitfreslon.vibration/package.json.meta
similarity index 100%
rename from package.json.meta
rename to Packages/com.benoitfreslon.vibration/package.json.meta
diff --git a/Packages/manifest.json b/Packages/manifest.json
new file mode 100644
index 0000000..7f2106a
--- /dev/null
+++ b/Packages/manifest.json
@@ -0,0 +1,45 @@
+{
+ "dependencies": {
+ "com.unity.collab-proxy": "2.0.7",
+ "com.unity.device-simulator.devices": "1.0.0",
+ "com.unity.feature.2d": "1.0.0",
+ "com.unity.ide.rider": "3.0.25",
+ "com.unity.ide.visualstudio": "2.0.21",
+ "com.unity.test-framework": "1.1.33",
+ "com.unity.textmeshpro": "3.0.6",
+ "com.unity.timeline": "1.7.5",
+ "com.unity.ugui": "1.0.0",
+ "com.unity.visualscripting": "1.8.0",
+ "com.unity.modules.ai": "1.0.0",
+ "com.unity.modules.androidjni": "1.0.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.modules.assetbundle": "1.0.0",
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.cloth": "1.0.0",
+ "com.unity.modules.director": "1.0.0",
+ "com.unity.modules.imageconversion": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0",
+ "com.unity.modules.particlesystem": "1.0.0",
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.physics2d": "1.0.0",
+ "com.unity.modules.screencapture": "1.0.0",
+ "com.unity.modules.terrain": "1.0.0",
+ "com.unity.modules.terrainphysics": "1.0.0",
+ "com.unity.modules.tilemap": "1.0.0",
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.uielements": "1.0.0",
+ "com.unity.modules.umbra": "1.0.0",
+ "com.unity.modules.unityanalytics": "1.0.0",
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
+ "com.unity.modules.unitywebrequestaudio": "1.0.0",
+ "com.unity.modules.unitywebrequesttexture": "1.0.0",
+ "com.unity.modules.unitywebrequestwww": "1.0.0",
+ "com.unity.modules.vehicles": "1.0.0",
+ "com.unity.modules.video": "1.0.0",
+ "com.unity.modules.vr": "1.0.0",
+ "com.unity.modules.wind": "1.0.0",
+ "com.unity.modules.xr": "1.0.0"
+ }
+}
diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json
new file mode 100644
index 0000000..9d7ba61
--- /dev/null
+++ b/Packages/packages-lock.json
@@ -0,0 +1,465 @@
+{
+ "dependencies": {
+ "com.benoitfreslon.vibration": {
+ "version": "file:com.benoitfreslon.vibration",
+ "depth": 0,
+ "source": "embedded",
+ "dependencies": {}
+ },
+ "com.unity.2d.animation": {
+ "version": "9.0.3",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.2d.common": "8.0.1",
+ "com.unity.2d.sprite": "1.0.0",
+ "com.unity.collections": "1.1.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.modules.uielements": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.2d.common": {
+ "version": "8.0.1",
+ "depth": 2,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.2d.sprite": "1.0.0",
+ "com.unity.mathematics": "1.1.0",
+ "com.unity.modules.uielements": "1.0.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.burst": "1.7.3"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.2d.pixel-perfect": {
+ "version": "5.0.3",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {},
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.2d.psdimporter": {
+ "version": "8.0.2",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.2d.animation": "9.0.1",
+ "com.unity.2d.common": "8.0.1",
+ "com.unity.2d.sprite": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.2d.sprite": {
+ "version": "1.0.0",
+ "depth": 1,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.2d.spriteshape": {
+ "version": "9.0.2",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.mathematics": "1.1.0",
+ "com.unity.2d.common": "8.0.1",
+ "com.unity.modules.physics2d": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.2d.tilemap": {
+ "version": "1.0.0",
+ "depth": 1,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.tilemap": "1.0.0",
+ "com.unity.modules.uielements": "1.0.0"
+ }
+ },
+ "com.unity.2d.tilemap.extras": {
+ "version": "3.1.0",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.modules.tilemap": "1.0.0",
+ "com.unity.2d.tilemap": "1.0.0",
+ "com.unity.ugui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.burst": {
+ "version": "1.8.4",
+ "depth": 3,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.mathematics": "1.2.1"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.collab-proxy": {
+ "version": "2.0.7",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {},
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.collections": {
+ "version": "1.2.4",
+ "depth": 2,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.burst": "1.6.6",
+ "com.unity.test-framework": "1.1.31"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.device-simulator.devices": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {},
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.ext.nunit": {
+ "version": "1.0.6",
+ "depth": 1,
+ "source": "registry",
+ "dependencies": {},
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.feature.2d": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.2d.animation": "9.0.3",
+ "com.unity.2d.pixel-perfect": "5.0.3",
+ "com.unity.2d.psdimporter": "8.0.2",
+ "com.unity.2d.sprite": "1.0.0",
+ "com.unity.2d.spriteshape": "9.0.2",
+ "com.unity.2d.tilemap": "1.0.0",
+ "com.unity.2d.tilemap.extras": "3.1.0"
+ }
+ },
+ "com.unity.ide.rider": {
+ "version": "3.0.25",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.ext.nunit": "1.0.6"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.ide.visualstudio": {
+ "version": "2.0.21",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.test-framework": "1.1.9"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.mathematics": {
+ "version": "1.2.6",
+ "depth": 2,
+ "source": "registry",
+ "dependencies": {},
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.test-framework": {
+ "version": "1.1.33",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.ext.nunit": "1.0.6",
+ "com.unity.modules.imgui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.textmeshpro": {
+ "version": "3.0.6",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.ugui": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.timeline": {
+ "version": "1.7.5",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.modules.director": "1.0.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.particlesystem": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.ugui": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0"
+ }
+ },
+ "com.unity.visualscripting": {
+ "version": "1.8.0",
+ "depth": 0,
+ "source": "registry",
+ "dependencies": {
+ "com.unity.ugui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0"
+ },
+ "url": "https://packages.unity.com"
+ },
+ "com.unity.modules.ai": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.androidjni": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.animation": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.assetbundle": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.audio": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.cloth": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.physics": "1.0.0"
+ }
+ },
+ "com.unity.modules.director": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.animation": "1.0.0"
+ }
+ },
+ "com.unity.modules.imageconversion": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.imgui": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.jsonserialize": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.particlesystem": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.physics": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.physics2d": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.screencapture": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.imageconversion": "1.0.0"
+ }
+ },
+ "com.unity.modules.subsystems": {
+ "version": "1.0.0",
+ "depth": 1,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.jsonserialize": "1.0.0"
+ }
+ },
+ "com.unity.modules.terrain": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.terrainphysics": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.terrain": "1.0.0"
+ }
+ },
+ "com.unity.modules.tilemap": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.physics2d": "1.0.0"
+ }
+ },
+ "com.unity.modules.ui": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.uielements": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0"
+ }
+ },
+ "com.unity.modules.umbra": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.unityanalytics": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0"
+ }
+ },
+ "com.unity.modules.unitywebrequest": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.unitywebrequestassetbundle": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.assetbundle": "1.0.0",
+ "com.unity.modules.unitywebrequest": "1.0.0"
+ }
+ },
+ "com.unity.modules.unitywebrequestaudio": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.audio": "1.0.0"
+ }
+ },
+ "com.unity.modules.unitywebrequesttexture": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.imageconversion": "1.0.0"
+ }
+ },
+ "com.unity.modules.unitywebrequestwww": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
+ "com.unity.modules.unitywebrequestaudio": "1.0.0",
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.assetbundle": "1.0.0",
+ "com.unity.modules.imageconversion": "1.0.0"
+ }
+ },
+ "com.unity.modules.vehicles": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.physics": "1.0.0"
+ }
+ },
+ "com.unity.modules.video": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.unitywebrequest": "1.0.0"
+ }
+ },
+ "com.unity.modules.vr": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.jsonserialize": "1.0.0",
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.xr": "1.0.0"
+ }
+ },
+ "com.unity.modules.wind": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {}
+ },
+ "com.unity.modules.xr": {
+ "version": "1.0.0",
+ "depth": 0,
+ "source": "builtin",
+ "dependencies": {
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0",
+ "com.unity.modules.subsystems": "1.0.0"
+ }
+ }
+ }
+}
diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset
new file mode 100644
index 0000000..27287fe
--- /dev/null
+++ b/ProjectSettings/AudioManager.asset
@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!11 &1
+AudioManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Volume: 1
+ Rolloff Scale: 1
+ Doppler Factor: 1
+ Default Speaker Mode: 2
+ m_SampleRate: 0
+ m_DSPBufferSize: 1024
+ m_VirtualVoiceCount: 512
+ m_RealVoiceCount: 32
+ m_SpatializerPlugin:
+ m_AmbisonicDecoderPlugin:
+ m_DisableAudio: 0
+ m_VirtualizeEffects: 1
+ m_RequestedDSPBufferSize: 0
diff --git a/ProjectSettings/BurstAotSettings_WebGL.json b/ProjectSettings/BurstAotSettings_WebGL.json
new file mode 100644
index 0000000..eed54c3
--- /dev/null
+++ b/ProjectSettings/BurstAotSettings_WebGL.json
@@ -0,0 +1,16 @@
+{
+ "MonoBehaviour": {
+ "Version": 4,
+ "EnableBurstCompilation": true,
+ "EnableOptimisations": true,
+ "EnableSafetyChecks": false,
+ "EnableDebugInAllBuilds": false,
+ "DebugDataKind": 1,
+ "EnableArmv9SecurityFeatures": false,
+ "CpuMinTargetX32": 0,
+ "CpuMaxTargetX32": 0,
+ "CpuMinTargetX64": 0,
+ "CpuMaxTargetX64": 0,
+ "OptimizeFor": 0
+ }
+}
diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset
new file mode 100644
index 0000000..e7886b2
--- /dev/null
+++ b/ProjectSettings/ClusterInputManager.asset
@@ -0,0 +1,6 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!236 &1
+ClusterInputManager:
+ m_ObjectHideFlags: 0
+ m_Inputs: []
diff --git a/ProjectSettings/CommonBurstAotSettings.json b/ProjectSettings/CommonBurstAotSettings.json
new file mode 100644
index 0000000..0293daf
--- /dev/null
+++ b/ProjectSettings/CommonBurstAotSettings.json
@@ -0,0 +1,6 @@
+{
+ "MonoBehaviour": {
+ "Version": 4,
+ "DisabledWarnings": ""
+ }
+}
diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset
new file mode 100644
index 0000000..72d1430
--- /dev/null
+++ b/ProjectSettings/DynamicsManager.asset
@@ -0,0 +1,37 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!55 &1
+PhysicsManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 13
+ m_Gravity: {x: 0, y: -9.81, z: 0}
+ m_DefaultMaterial: {fileID: 0}
+ m_BounceThreshold: 2
+ m_DefaultMaxDepenetrationVelocity: 10
+ m_SleepThreshold: 0.005
+ m_DefaultContactOffset: 0.01
+ m_DefaultSolverIterations: 6
+ m_DefaultSolverVelocityIterations: 1
+ m_QueriesHitBackfaces: 0
+ m_QueriesHitTriggers: 1
+ m_EnableAdaptiveForce: 0
+ m_ClothInterCollisionDistance: 0.1
+ m_ClothInterCollisionStiffness: 0.2
+ m_ContactsGeneration: 1
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ m_AutoSimulation: 1
+ m_AutoSyncTransforms: 0
+ m_ReuseCollisionCallbacks: 1
+ m_ClothInterCollisionSettingsToggle: 0
+ m_ClothGravity: {x: 0, y: -9.81, z: 0}
+ m_ContactPairsMode: 0
+ m_BroadphaseType: 0
+ m_WorldBounds:
+ m_Center: {x: 0, y: 0, z: 0}
+ m_Extent: {x: 250, y: 250, z: 250}
+ m_WorldSubdivisions: 8
+ m_FrictionType: 0
+ m_EnableEnhancedDeterminism: 0
+ m_EnableUnifiedHeightmaps: 1
+ m_SolverType: 0
+ m_DefaultMaxAngularSpeed: 50
diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset
new file mode 100644
index 0000000..1252292
--- /dev/null
+++ b/ProjectSettings/EditorBuildSettings.asset
@@ -0,0 +1,11 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1045 &1
+EditorBuildSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Scenes:
+ - enabled: 1
+ path: Packages/com.benoitfreslon.vibration/Samples/VibrationExample/VibrationExample.unity
+ guid: 2cda990e2423bbf4892e6590ba056729
+ m_configObjects: {}
diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset
new file mode 100644
index 0000000..e6f57fd
--- /dev/null
+++ b/ProjectSettings/EditorSettings.asset
@@ -0,0 +1,40 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!159 &1
+EditorSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 11
+ m_SerializationMode: 2
+ m_LineEndingsForNewScripts: 0
+ m_DefaultBehaviorMode: 1
+ m_PrefabRegularEnvironment: {fileID: 0}
+ m_PrefabUIEnvironment: {fileID: 0}
+ m_SpritePackerMode: 5
+ m_SpritePackerPaddingPower: 1
+ m_EtcTextureCompressorBehavior: 1
+ m_EtcTextureFastCompressor: 1
+ m_EtcTextureNormalCompressor: 2
+ m_EtcTextureBestCompressor: 4
+ m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp
+ m_ProjectGenerationRootNamespace:
+ m_EnableTextureStreamingInEditMode: 1
+ m_EnableTextureStreamingInPlayMode: 1
+ m_AsyncShaderCompilation: 1
+ m_CachingShaderPreprocessor: 1
+ m_PrefabModeAllowAutoSave: 1
+ m_EnterPlayModeOptionsEnabled: 0
+ m_EnterPlayModeOptions: 3
+ m_GameObjectNamingDigits: 1
+ m_GameObjectNamingScheme: 0
+ m_AssetNamingUsesSpace: 1
+ m_UseLegacyProbeSampleCount: 0
+ m_SerializeInlineMappingsOnOneLine: 1
+ m_DisableCookiesInLightmapper: 1
+ m_AssetPipelineMode: 1
+ m_CacheServerMode: 0
+ m_CacheServerEndpoint:
+ m_CacheServerNamespacePrefix: default
+ m_CacheServerEnableDownload: 1
+ m_CacheServerEnableUpload: 1
+ m_CacheServerEnableAuth: 0
+ m_CacheServerEnableTls: 0
diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset
new file mode 100644
index 0000000..c165afb
--- /dev/null
+++ b/ProjectSettings/GraphicsSettings.asset
@@ -0,0 +1,64 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!30 &1
+GraphicsSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 13
+ m_Deferred:
+ m_Mode: 1
+ m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
+ m_DeferredReflections:
+ m_Mode: 1
+ m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
+ m_ScreenSpaceShadows:
+ m_Mode: 1
+ m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
+ m_LegacyDeferred:
+ m_Mode: 1
+ m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
+ m_DepthNormals:
+ m_Mode: 1
+ m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
+ m_MotionVectors:
+ m_Mode: 1
+ m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
+ m_LightHalo:
+ m_Mode: 1
+ m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
+ m_LensFlare:
+ m_Mode: 1
+ m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
+ m_VideoShadersIncludeMode: 2
+ m_AlwaysIncludedShaders:
+ - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
+ m_PreloadedShaders: []
+ m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_CustomRenderPipeline: {fileID: 0}
+ m_TransparencySortMode: 0
+ m_TransparencySortAxis: {x: 0, y: 0, z: 1}
+ m_DefaultRenderingPath: 1
+ m_DefaultMobileRenderingPath: 1
+ m_TierSettings: []
+ m_LightmapStripping: 0
+ m_FogStripping: 0
+ m_InstancingStripping: 0
+ m_LightmapKeepPlain: 1
+ m_LightmapKeepDirCombined: 1
+ m_LightmapKeepDynamicPlain: 1
+ m_LightmapKeepDynamicDirCombined: 1
+ m_LightmapKeepShadowMask: 1
+ m_LightmapKeepSubtractive: 1
+ m_FogKeepLinear: 1
+ m_FogKeepExp: 1
+ m_FogKeepExp2: 1
+ m_AlbedoSwatchInfos: []
+ m_LightsUseLinearIntensity: 0
+ m_LightsUseColorTemperature: 0
+ m_DefaultRenderingLayerMask: 1
+ m_LogWhenShaderIsCompiled: 0
diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset
new file mode 100644
index 0000000..b16147e
--- /dev/null
+++ b/ProjectSettings/InputManager.asset
@@ -0,0 +1,487 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!13 &1
+InputManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Axes:
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton: a
+ altPositiveButton: d
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton: s
+ altPositiveButton: w
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left ctrl
+ altNegativeButton:
+ altPositiveButton: mouse 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left alt
+ altNegativeButton:
+ altPositiveButton: mouse 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left shift
+ altNegativeButton:
+ altPositiveButton: mouse 2
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: space
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse X
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse Y
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse ScrollWheel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 2
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 1
+ type: 2
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 0
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 1
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 2
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 3
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: return
+ altNegativeButton:
+ altPositiveButton: joystick button 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: enter
+ altNegativeButton:
+ altPositiveButton: space
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Cancel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: escape
+ altNegativeButton:
+ altPositiveButton: joystick button 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Enable Debug Button 1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left ctrl
+ altNegativeButton:
+ altPositiveButton: joystick button 8
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Enable Debug Button 2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: backspace
+ altNegativeButton:
+ altPositiveButton: joystick button 9
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Reset
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left alt
+ altNegativeButton:
+ altPositiveButton: joystick button 1
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Next
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: page down
+ altNegativeButton:
+ altPositiveButton: joystick button 5
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Previous
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: page up
+ altNegativeButton:
+ altPositiveButton: joystick button 4
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Validate
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: return
+ altNegativeButton:
+ altPositiveButton: joystick button 0
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Persistent
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: right shift
+ altNegativeButton:
+ altPositiveButton: joystick button 2
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Multiplier
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left shift
+ altNegativeButton:
+ altPositiveButton: joystick button 3
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 6
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 5
+ joyNum: 0
diff --git a/ProjectSettings/MemorySettings.asset b/ProjectSettings/MemorySettings.asset
new file mode 100644
index 0000000..5b5face
--- /dev/null
+++ b/ProjectSettings/MemorySettings.asset
@@ -0,0 +1,35 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!387306366 &1
+MemorySettings:
+ m_ObjectHideFlags: 0
+ m_EditorMemorySettings:
+ m_MainAllocatorBlockSize: -1
+ m_ThreadAllocatorBlockSize: -1
+ m_MainGfxBlockSize: -1
+ m_ThreadGfxBlockSize: -1
+ m_CacheBlockSize: -1
+ m_TypetreeBlockSize: -1
+ m_ProfilerBlockSize: -1
+ m_ProfilerEditorBlockSize: -1
+ m_BucketAllocatorGranularity: -1
+ m_BucketAllocatorBucketsCount: -1
+ m_BucketAllocatorBlockSize: -1
+ m_BucketAllocatorBlockCount: -1
+ m_ProfilerBucketAllocatorGranularity: -1
+ m_ProfilerBucketAllocatorBucketsCount: -1
+ m_ProfilerBucketAllocatorBlockSize: -1
+ m_ProfilerBucketAllocatorBlockCount: -1
+ m_TempAllocatorSizeMain: -1
+ m_JobTempAllocatorBlockSize: -1
+ m_BackgroundJobTempAllocatorBlockSize: -1
+ m_JobTempAllocatorReducedBlockSize: -1
+ m_TempAllocatorSizeGIBakingWorker: -1
+ m_TempAllocatorSizeNavMeshWorker: -1
+ m_TempAllocatorSizeAudioWorker: -1
+ m_TempAllocatorSizeCloudWorker: -1
+ m_TempAllocatorSizeGfx: -1
+ m_TempAllocatorSizeJobWorker: -1
+ m_TempAllocatorSizeBackgroundWorker: -1
+ m_TempAllocatorSizePreloadManager: -1
+ m_PlatformMemorySettings: {}
diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset
new file mode 100644
index 0000000..ad2654e
--- /dev/null
+++ b/ProjectSettings/NavMeshAreas.asset
@@ -0,0 +1,93 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!126 &1
+NavMeshProjectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ areas:
+ - name: Walkable
+ cost: 1
+ - name: Not Walkable
+ cost: 1
+ - name: Jump
+ cost: 2
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ m_LastAgentTypeID: -887442657
+ m_Settings:
+ - serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.75
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ maxJobWorkers: 0
+ preserveTilesOutsideBounds: 0
+ debug:
+ m_Flags: 0
+ m_SettingNames:
+ - Humanoid
diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset
new file mode 100644
index 0000000..5dc6a83
--- /dev/null
+++ b/ProjectSettings/NetworkManager.asset
@@ -0,0 +1,8 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!149 &1
+NetworkManager:
+ m_ObjectHideFlags: 0
+ m_DebugLevel: 0
+ m_Sendrate: 15
+ m_AssetToPrefab: {}
diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset
new file mode 100644
index 0000000..b3a65dd
--- /dev/null
+++ b/ProjectSettings/PackageManagerSettings.asset
@@ -0,0 +1,44 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &1
+MonoBehaviour:
+ m_ObjectHideFlags: 61
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_EnablePreReleasePackages: 0
+ m_EnablePackageDependencies: 0
+ m_AdvancedSettingsExpanded: 1
+ m_ScopedRegistriesSettingsExpanded: 1
+ m_SeeAllPackageVersions: 0
+ oneTimeWarningShown: 0
+ m_Registries:
+ - m_Id: main
+ m_Name:
+ m_Url: https://packages.unity.com
+ m_Scopes: []
+ m_IsDefault: 1
+ m_Capabilities: 7
+ m_UserSelectedRegistryName:
+ m_UserAddingNewScopedRegistry: 0
+ m_RegistryInfoDraft:
+ m_ErrorMessage:
+ m_Original:
+ m_Id:
+ m_Name:
+ m_Url:
+ m_Scopes: []
+ m_IsDefault: 0
+ m_Capabilities: 0
+ m_Modified: 0
+ m_Name:
+ m_Url:
+ m_Scopes:
+ -
+ m_SelectedScopeIndex: 0
diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset
new file mode 100644
index 0000000..6cfcdda
--- /dev/null
+++ b/ProjectSettings/Physics2DSettings.asset
@@ -0,0 +1,56 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!19 &1
+Physics2DSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 5
+ m_Gravity: {x: 0, y: -9.81}
+ m_DefaultMaterial: {fileID: 0}
+ m_VelocityIterations: 8
+ m_PositionIterations: 3
+ m_VelocityThreshold: 1
+ m_MaxLinearCorrection: 0.2
+ m_MaxAngularCorrection: 8
+ m_MaxTranslationSpeed: 100
+ m_MaxRotationSpeed: 360
+ m_BaumgarteScale: 0.2
+ m_BaumgarteTimeOfImpactScale: 0.75
+ m_TimeToSleep: 0.5
+ m_LinearSleepTolerance: 0.01
+ m_AngularSleepTolerance: 2
+ m_DefaultContactOffset: 0.01
+ m_JobOptions:
+ serializedVersion: 2
+ useMultithreading: 0
+ useConsistencySorting: 0
+ m_InterpolationPosesPerJob: 100
+ m_NewContactsPerJob: 30
+ m_CollideContactsPerJob: 100
+ m_ClearFlagsPerJob: 200
+ m_ClearBodyForcesPerJob: 200
+ m_SyncDiscreteFixturesPerJob: 50
+ m_SyncContinuousFixturesPerJob: 50
+ m_FindNearestContactsPerJob: 100
+ m_UpdateTriggerContactsPerJob: 100
+ m_IslandSolverCostThreshold: 100
+ m_IslandSolverBodyCostScale: 1
+ m_IslandSolverContactCostScale: 10
+ m_IslandSolverJointCostScale: 10
+ m_IslandSolverBodiesPerJob: 50
+ m_IslandSolverContactsPerJob: 50
+ m_SimulationMode: 0
+ m_QueriesHitTriggers: 1
+ m_QueriesStartInColliders: 1
+ m_CallbacksOnDisable: 1
+ m_ReuseCollisionCallbacks: 1
+ m_AutoSyncTransforms: 0
+ m_AlwaysShowColliders: 0
+ m_ShowColliderSleep: 1
+ m_ShowColliderContacts: 0
+ m_ShowColliderAABB: 0
+ m_ContactArrowScale: 0.2
+ m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
+ m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
+ m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
+ m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset
new file mode 100644
index 0000000..67a94da
--- /dev/null
+++ b/ProjectSettings/PresetManager.asset
@@ -0,0 +1,7 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1386491679 &1
+PresetManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_DefaultPresets: {}
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
new file mode 100644
index 0000000..896bb4a
--- /dev/null
+++ b/ProjectSettings/ProjectSettings.asset
@@ -0,0 +1,895 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!129 &1
+PlayerSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 26
+ productGUID: fe3d18c6e80d57648835ae4374799b8a
+ AndroidProfiler: 0
+ AndroidFilterTouchesWhenObscured: 0
+ AndroidEnableSustainedPerformanceMode: 0
+ defaultScreenOrientation: 4
+ targetDevice: 2
+ useOnDemandResources: 0
+ accelerometerFrequency: 60
+ companyName: DefaultCompany
+ productName: Vibration.Upm.Embedded
+ defaultCursor: {fileID: 0}
+ cursorHotspot: {x: 0, y: 0}
+ m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
+ m_ShowUnitySplashScreen: 1
+ m_ShowUnitySplashLogo: 1
+ m_SplashScreenOverlayOpacity: 1
+ m_SplashScreenAnimation: 1
+ m_SplashScreenLogoStyle: 1
+ m_SplashScreenDrawMode: 0
+ m_SplashScreenBackgroundAnimationZoom: 1
+ m_SplashScreenLogoAnimationZoom: 1
+ m_SplashScreenBackgroundLandscapeAspect: 1
+ m_SplashScreenBackgroundPortraitAspect: 1
+ m_SplashScreenBackgroundLandscapeUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenBackgroundPortraitUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenLogos: []
+ m_VirtualRealitySplashScreen: {fileID: 0}
+ m_HolographicTrackingLossScreen: {fileID: 0}
+ defaultScreenWidth: 1920
+ defaultScreenHeight: 1080
+ defaultScreenWidthWeb: 960
+ defaultScreenHeightWeb: 600
+ m_StereoRenderingPath: 0
+ m_ActiveColorSpace: 1
+ m_SpriteBatchVertexThreshold: 300
+ m_MTRendering: 1
+ mipStripping: 0
+ numberOfMipsStripped: 0
+ numberOfMipsStrippedPerMipmapLimitGroup: {}
+ m_StackTraceTypes: 010000000100000001000000010000000100000001000000
+ iosShowActivityIndicatorOnLoading: -1
+ androidShowActivityIndicatorOnLoading: -1
+ iosUseCustomAppBackgroundBehavior: 0
+ allowedAutorotateToPortrait: 1
+ allowedAutorotateToPortraitUpsideDown: 1
+ allowedAutorotateToLandscapeRight: 1
+ allowedAutorotateToLandscapeLeft: 1
+ useOSAutorotation: 1
+ use32BitDisplayBuffer: 1
+ preserveFramebufferAlpha: 0
+ disableDepthAndStencilBuffers: 0
+ androidStartInFullscreen: 1
+ androidRenderOutsideSafeArea: 1
+ androidUseSwappy: 1
+ androidBlitType: 0
+ androidResizableWindow: 0
+ androidDefaultWindowWidth: 1920
+ androidDefaultWindowHeight: 1080
+ androidMinimumWindowWidth: 400
+ androidMinimumWindowHeight: 300
+ androidFullscreenMode: 1
+ defaultIsNativeResolution: 1
+ macRetinaSupport: 1
+ runInBackground: 0
+ captureSingleScreen: 0
+ muteOtherAudioSources: 0
+ Prepare IOS For Recording: 0
+ Force IOS Speakers When Recording: 0
+ deferSystemGesturesMode: 0
+ hideHomeButton: 0
+ submitAnalytics: 1
+ usePlayerLog: 1
+ bakeCollisionMeshes: 0
+ forceSingleInstance: 0
+ useFlipModelSwapchain: 1
+ resizableWindow: 0
+ useMacAppStoreValidation: 0
+ macAppStoreCategory: public.app-category.games
+ gpuSkinning: 0
+ xboxPIXTextureCapture: 0
+ xboxEnableAvatar: 0
+ xboxEnableKinect: 0
+ xboxEnableKinectAutoTracking: 0
+ xboxEnableFitness: 0
+ visibleInBackground: 1
+ allowFullscreenSwitch: 1
+ fullscreenMode: 1
+ xboxSpeechDB: 0
+ xboxEnableHeadOrientation: 0
+ xboxEnableGuest: 0
+ xboxEnablePIXSampling: 0
+ metalFramebufferOnly: 0
+ xboxOneResolution: 0
+ xboxOneSResolution: 0
+ xboxOneXResolution: 3
+ xboxOneMonoLoggingLevel: 0
+ xboxOneLoggingLevel: 1
+ xboxOneDisableEsram: 0
+ xboxOneEnableTypeOptimization: 0
+ xboxOnePresentImmediateThreshold: 0
+ switchQueueCommandMemory: 1048576
+ switchQueueControlMemory: 16384
+ switchQueueComputeMemory: 262144
+ switchNVNShaderPoolsGranularity: 33554432
+ switchNVNDefaultPoolsGranularity: 16777216
+ switchNVNOtherPoolsGranularity: 16777216
+ switchGpuScratchPoolGranularity: 2097152
+ switchAllowGpuScratchShrinking: 0
+ switchNVNMaxPublicTextureIDCount: 0
+ switchNVNMaxPublicSamplerIDCount: 0
+ switchNVNGraphicsFirmwareMemory: 32
+ stadiaPresentMode: 0
+ stadiaTargetFramerate: 0
+ vulkanNumSwapchainBuffers: 3
+ vulkanEnableSetSRGBWrite: 0
+ vulkanEnablePreTransform: 0
+ vulkanEnableLateAcquireNextImage: 0
+ vulkanEnableCommandBufferRecycling: 1
+ loadStoreDebugModeEnabled: 0
+ bundleVersion: 1.0
+ preloadedAssets: []
+ metroInputSource: 0
+ wsaTransparentSwapchain: 0
+ m_HolographicPauseOnTrackingLoss: 1
+ xboxOneDisableKinectGpuReservation: 1
+ xboxOneEnable7thCore: 1
+ vrSettings:
+ enable360StereoCapture: 0
+ isWsaHolographicRemotingEnabled: 0
+ enableFrameTimingStats: 0
+ enableOpenGLProfilerGPURecorders: 1
+ useHDRDisplay: 0
+ hdrBitDepth: 0
+ m_ColorGamuts: 00000000
+ targetPixelDensity: 30
+ resolutionScalingMode: 0
+ resetResolutionOnWindowResize: 0
+ androidSupportedAspectRatio: 1
+ androidMaxAspectRatio: 2.1
+ applicationIdentifier:
+ Standalone: com.DefaultCompany.2DProject
+ buildNumber:
+ Standalone: 0
+ iPhone: 0
+ tvOS: 0
+ overrideDefaultApplicationIdentifier: 1
+ AndroidBundleVersionCode: 1
+ AndroidMinSdkVersion: 22
+ AndroidTargetSdkVersion: 0
+ AndroidPreferredInstallLocation: 1
+ aotOptions:
+ stripEngineCode: 1
+ iPhoneStrippingLevel: 0
+ iPhoneScriptCallOptimization: 0
+ ForceInternetPermission: 0
+ ForceSDCardPermission: 0
+ CreateWallpaper: 0
+ APKExpansionFiles: 0
+ keepLoadedShadersAlive: 0
+ StripUnusedMeshComponents: 0
+ strictShaderVariantMatching: 0
+ VertexChannelCompressionMask: 4054
+ iPhoneSdkVersion: 988
+ iOSTargetOSVersionString: 12.0
+ tvOSSdkVersion: 0
+ tvOSRequireExtendedGameController: 0
+ tvOSTargetOSVersionString: 12.0
+ uIPrerenderedIcon: 0
+ uIRequiresPersistentWiFi: 0
+ uIRequiresFullScreen: 1
+ uIStatusBarHidden: 1
+ uIExitOnSuspend: 0
+ uIStatusBarStyle: 0
+ appleTVSplashScreen: {fileID: 0}
+ appleTVSplashScreen2x: {fileID: 0}
+ tvOSSmallIconLayers: []
+ tvOSSmallIconLayers2x: []
+ tvOSLargeIconLayers: []
+ tvOSLargeIconLayers2x: []
+ tvOSTopShelfImageLayers: []
+ tvOSTopShelfImageLayers2x: []
+ tvOSTopShelfImageWideLayers: []
+ tvOSTopShelfImageWideLayers2x: []
+ iOSLaunchScreenType: 0
+ iOSLaunchScreenPortrait: {fileID: 0}
+ iOSLaunchScreenLandscape: {fileID: 0}
+ iOSLaunchScreenBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreenFillPct: 100
+ iOSLaunchScreenSize: 100
+ iOSLaunchScreenCustomXibPath:
+ iOSLaunchScreeniPadType: 0
+ iOSLaunchScreeniPadImage: {fileID: 0}
+ iOSLaunchScreeniPadBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreeniPadFillPct: 100
+ iOSLaunchScreeniPadSize: 100
+ iOSLaunchScreeniPadCustomXibPath:
+ iOSLaunchScreenCustomStoryboardPath:
+ iOSLaunchScreeniPadCustomStoryboardPath:
+ iOSDeviceRequirements: []
+ iOSURLSchemes: []
+ macOSURLSchemes: []
+ iOSBackgroundModes: 0
+ iOSMetalForceHardShadows: 0
+ metalEditorSupport: 1
+ metalAPIValidation: 1
+ iOSRenderExtraFrameOnPause: 0
+ iosCopyPluginsCodeInsteadOfSymlink: 0
+ appleDeveloperTeamID:
+ iOSManualSigningProvisioningProfileID:
+ tvOSManualSigningProvisioningProfileID:
+ iOSManualSigningProvisioningProfileType: 0
+ tvOSManualSigningProvisioningProfileType: 0
+ appleEnableAutomaticSigning: 0
+ iOSRequireARKit: 0
+ iOSAutomaticallyDetectAndAddCapabilities: 1
+ appleEnableProMotion: 0
+ shaderPrecisionModel: 0
+ clonedFromGUID: 10ad67313f4034357812315f3c407484
+ templatePackageId: com.unity.template.2d@7.0.3
+ templateDefaultScene: Assets/Scenes/SampleScene.unity
+ useCustomMainManifest: 0
+ useCustomLauncherManifest: 0
+ useCustomMainGradleTemplate: 0
+ useCustomLauncherGradleManifest: 0
+ useCustomBaseGradleTemplate: 0
+ useCustomGradlePropertiesTemplate: 0
+ useCustomGradleSettingsTemplate: 0
+ useCustomProguardFile: 0
+ AndroidTargetArchitectures: 1
+ AndroidTargetDevices: 0
+ AndroidSplashScreenScale: 0
+ androidSplashScreen: {fileID: 0}
+ AndroidKeystoreName:
+ AndroidKeyaliasName:
+ AndroidEnableArmv9SecurityFeatures: 0
+ AndroidBuildApkPerCpuArchitecture: 0
+ AndroidTVCompatibility: 0
+ AndroidIsGame: 1
+ AndroidEnableTango: 0
+ androidEnableBanner: 1
+ androidUseLowAccuracyLocation: 0
+ androidUseCustomKeystore: 0
+ m_AndroidBanners:
+ - width: 320
+ height: 180
+ banner: {fileID: 0}
+ androidGamepadSupportLevel: 0
+ chromeosInputEmulation: 1
+ AndroidMinifyRelease: 0
+ AndroidMinifyDebug: 0
+ AndroidValidateAppBundleSize: 1
+ AndroidAppBundleSizeToValidate: 150
+ m_BuildTargetIcons: []
+ m_BuildTargetPlatformIcons:
+ - m_BuildTarget: iPhone
+ m_Icons:
+ - m_Textures: []
+ m_Width: 180
+ m_Height: 180
+ m_Kind: 0
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 120
+ m_Height: 120
+ m_Kind: 0
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 167
+ m_Height: 167
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 152
+ m_Height: 152
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 76
+ m_Height: 76
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 120
+ m_Height: 120
+ m_Kind: 3
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 80
+ m_Height: 80
+ m_Kind: 3
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 80
+ m_Height: 80
+ m_Kind: 3
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 3
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 87
+ m_Height: 87
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 58
+ m_Height: 58
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 29
+ m_Height: 29
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 58
+ m_Height: 58
+ m_Kind: 1
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 29
+ m_Height: 29
+ m_Kind: 1
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 60
+ m_Height: 60
+ m_Kind: 2
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 2
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 2
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 20
+ m_Height: 20
+ m_Kind: 2
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 1024
+ m_Height: 1024
+ m_Kind: 4
+ m_SubKind: App Store
+ - m_BuildTarget: Android
+ m_Icons:
+ - m_Textures: []
+ m_Width: 432
+ m_Height: 432
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 324
+ m_Height: 324
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 216
+ m_Height: 216
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 162
+ m_Height: 162
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 108
+ m_Height: 108
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 81
+ m_Height: 81
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 0
+ m_SubKind:
+ m_BuildTargetBatching: []
+ m_BuildTargetShaderSettings: []
+ m_BuildTargetGraphicsJobs:
+ - m_BuildTarget: MacStandaloneSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: Switch
+ m_GraphicsJobs: 0
+ - m_BuildTarget: MetroSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: AppleTVSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: BJMSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: LinuxStandaloneSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: PS4Player
+ m_GraphicsJobs: 0
+ - m_BuildTarget: iOSSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: WindowsStandaloneSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: XboxOnePlayer
+ m_GraphicsJobs: 0
+ - m_BuildTarget: LuminSupport
+ m_GraphicsJobs: 0
+ - m_BuildTarget: AndroidPlayer
+ m_GraphicsJobs: 0
+ - m_BuildTarget: WebGLSupport
+ m_GraphicsJobs: 0
+ m_BuildTargetGraphicsJobMode: []
+ m_BuildTargetGraphicsAPIs:
+ - m_BuildTarget: AndroidPlayer
+ m_APIs: 150000000b000000
+ m_Automatic: 1
+ - m_BuildTarget: iOSSupport
+ m_APIs: 10000000
+ m_Automatic: 1
+ m_BuildTargetVRSettings: []
+ m_DefaultShaderChunkSizeInMB: 16
+ m_DefaultShaderChunkCount: 0
+ openGLRequireES31: 0
+ openGLRequireES31AEP: 0
+ openGLRequireES32: 0
+ m_TemplateCustomTags: {}
+ mobileMTRendering:
+ Android: 1
+ iPhone: 1
+ tvOS: 1
+ m_BuildTargetGroupLightmapEncodingQuality: []
+ m_BuildTargetGroupHDRCubemapEncodingQuality: []
+ m_BuildTargetGroupLightmapSettings: []
+ m_BuildTargetGroupLoadStoreDebugModeSettings: []
+ m_BuildTargetNormalMapEncoding: []
+ m_BuildTargetDefaultTextureCompressionFormat:
+ - m_BuildTarget: Android
+ m_Format: 3
+ playModeTestRunnerEnabled: 0
+ runPlayModeTestAsEditModeTest: 0
+ actionOnDotNetUnhandledException: 1
+ enableInternalProfiler: 0
+ logObjCUncaughtExceptions: 1
+ enableCrashReportAPI: 0
+ cameraUsageDescription:
+ locationUsageDescription:
+ microphoneUsageDescription:
+ bluetoothUsageDescription:
+ macOSTargetOSVersion: 10.13.0
+ switchNMETAOverride:
+ switchNetLibKey:
+ switchSocketMemoryPoolSize: 6144
+ switchSocketAllocatorPoolSize: 128
+ switchSocketConcurrencyLimit: 14
+ switchScreenResolutionBehavior: 2
+ switchUseCPUProfiler: 0
+ switchUseGOLDLinker: 0
+ switchLTOSetting: 0
+ switchApplicationID: 0x01004b9000490000
+ switchNSODependencies:
+ switchCompilerFlags:
+ switchTitleNames_0:
+ switchTitleNames_1:
+ switchTitleNames_2:
+ switchTitleNames_3:
+ switchTitleNames_4:
+ switchTitleNames_5:
+ switchTitleNames_6:
+ switchTitleNames_7:
+ switchTitleNames_8:
+ switchTitleNames_9:
+ switchTitleNames_10:
+ switchTitleNames_11:
+ switchTitleNames_12:
+ switchTitleNames_13:
+ switchTitleNames_14:
+ switchTitleNames_15:
+ switchPublisherNames_0:
+ switchPublisherNames_1:
+ switchPublisherNames_2:
+ switchPublisherNames_3:
+ switchPublisherNames_4:
+ switchPublisherNames_5:
+ switchPublisherNames_6:
+ switchPublisherNames_7:
+ switchPublisherNames_8:
+ switchPublisherNames_9:
+ switchPublisherNames_10:
+ switchPublisherNames_11:
+ switchPublisherNames_12:
+ switchPublisherNames_13:
+ switchPublisherNames_14:
+ switchPublisherNames_15:
+ switchIcons_0: {fileID: 0}
+ switchIcons_1: {fileID: 0}
+ switchIcons_2: {fileID: 0}
+ switchIcons_3: {fileID: 0}
+ switchIcons_4: {fileID: 0}
+ switchIcons_5: {fileID: 0}
+ switchIcons_6: {fileID: 0}
+ switchIcons_7: {fileID: 0}
+ switchIcons_8: {fileID: 0}
+ switchIcons_9: {fileID: 0}
+ switchIcons_10: {fileID: 0}
+ switchIcons_11: {fileID: 0}
+ switchIcons_12: {fileID: 0}
+ switchIcons_13: {fileID: 0}
+ switchIcons_14: {fileID: 0}
+ switchIcons_15: {fileID: 0}
+ switchSmallIcons_0: {fileID: 0}
+ switchSmallIcons_1: {fileID: 0}
+ switchSmallIcons_2: {fileID: 0}
+ switchSmallIcons_3: {fileID: 0}
+ switchSmallIcons_4: {fileID: 0}
+ switchSmallIcons_5: {fileID: 0}
+ switchSmallIcons_6: {fileID: 0}
+ switchSmallIcons_7: {fileID: 0}
+ switchSmallIcons_8: {fileID: 0}
+ switchSmallIcons_9: {fileID: 0}
+ switchSmallIcons_10: {fileID: 0}
+ switchSmallIcons_11: {fileID: 0}
+ switchSmallIcons_12: {fileID: 0}
+ switchSmallIcons_13: {fileID: 0}
+ switchSmallIcons_14: {fileID: 0}
+ switchSmallIcons_15: {fileID: 0}
+ switchManualHTML:
+ switchAccessibleURLs:
+ switchLegalInformation:
+ switchMainThreadStackSize: 1048576
+ switchPresenceGroupId:
+ switchLogoHandling: 0
+ switchReleaseVersion: 0
+ switchDisplayVersion: 1.0.0
+ switchStartupUserAccount: 0
+ switchSupportedLanguagesMask: 0
+ switchLogoType: 0
+ switchApplicationErrorCodeCategory:
+ switchUserAccountSaveDataSize: 0
+ switchUserAccountSaveDataJournalSize: 0
+ switchApplicationAttribute: 0
+ switchCardSpecSize: -1
+ switchCardSpecClock: -1
+ switchRatingsMask: 0
+ switchRatingsInt_0: 0
+ switchRatingsInt_1: 0
+ switchRatingsInt_2: 0
+ switchRatingsInt_3: 0
+ switchRatingsInt_4: 0
+ switchRatingsInt_5: 0
+ switchRatingsInt_6: 0
+ switchRatingsInt_7: 0
+ switchRatingsInt_8: 0
+ switchRatingsInt_9: 0
+ switchRatingsInt_10: 0
+ switchRatingsInt_11: 0
+ switchRatingsInt_12: 0
+ switchLocalCommunicationIds_0:
+ switchLocalCommunicationIds_1:
+ switchLocalCommunicationIds_2:
+ switchLocalCommunicationIds_3:
+ switchLocalCommunicationIds_4:
+ switchLocalCommunicationIds_5:
+ switchLocalCommunicationIds_6:
+ switchLocalCommunicationIds_7:
+ switchParentalControl: 0
+ switchAllowsScreenshot: 1
+ switchAllowsVideoCapturing: 1
+ switchAllowsRuntimeAddOnContentInstall: 0
+ switchDataLossConfirmation: 0
+ switchUserAccountLockEnabled: 0
+ switchSystemResourceMemory: 16777216
+ switchSupportedNpadStyles: 22
+ switchNativeFsCacheSize: 32
+ switchIsHoldTypeHorizontal: 0
+ switchSupportedNpadCount: 8
+ switchEnableTouchScreen: 1
+ switchSocketConfigEnabled: 0
+ switchTcpInitialSendBufferSize: 32
+ switchTcpInitialReceiveBufferSize: 64
+ switchTcpAutoSendBufferSizeMax: 256
+ switchTcpAutoReceiveBufferSizeMax: 256
+ switchUdpSendBufferSize: 9
+ switchUdpReceiveBufferSize: 42
+ switchSocketBufferEfficiency: 4
+ switchSocketInitializeEnabled: 1
+ switchNetworkInterfaceManagerInitializeEnabled: 1
+ switchPlayerConnectionEnabled: 1
+ switchUseNewStyleFilepaths: 0
+ switchUseLegacyFmodPriorities: 0
+ switchUseMicroSleepForYield: 1
+ switchEnableRamDiskSupport: 0
+ switchMicroSleepForYieldTime: 25
+ switchRamDiskSpaceSize: 12
+ ps4NPAgeRating: 12
+ ps4NPTitleSecret:
+ ps4NPTrophyPackPath:
+ ps4ParentalLevel: 11
+ ps4ContentID: ED1633-NPXX51362_00-0000000000000000
+ ps4Category: 0
+ ps4MasterVersion: 01.00
+ ps4AppVersion: 01.00
+ ps4AppType: 0
+ ps4ParamSfxPath:
+ ps4VideoOutPixelFormat: 0
+ ps4VideoOutInitialWidth: 1920
+ ps4VideoOutBaseModeInitialWidth: 1920
+ ps4VideoOutReprojectionRate: 60
+ ps4PronunciationXMLPath:
+ ps4PronunciationSIGPath:
+ ps4BackgroundImagePath:
+ ps4StartupImagePath:
+ ps4StartupImagesFolder:
+ ps4IconImagesFolder:
+ ps4SaveDataImagePath:
+ ps4SdkOverride:
+ ps4BGMPath:
+ ps4ShareFilePath:
+ ps4ShareOverlayImagePath:
+ ps4PrivacyGuardImagePath:
+ ps4ExtraSceSysFile:
+ ps4NPtitleDatPath:
+ ps4RemotePlayKeyAssignment: -1
+ ps4RemotePlayKeyMappingDir:
+ ps4PlayTogetherPlayerCount: 0
+ ps4EnterButtonAssignment: 2
+ ps4ApplicationParam1: 0
+ ps4ApplicationParam2: 0
+ ps4ApplicationParam3: 0
+ ps4ApplicationParam4: 0
+ ps4DownloadDataSize: 0
+ ps4GarlicHeapSize: 2048
+ ps4ProGarlicHeapSize: 2560
+ playerPrefsMaxSize: 32768
+ ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh
+ ps4pnSessions: 1
+ ps4pnPresence: 1
+ ps4pnFriends: 1
+ ps4pnGameCustomData: 1
+ playerPrefsSupport: 0
+ enableApplicationExit: 0
+ resetTempFolder: 1
+ restrictedAudioUsageRights: 0
+ ps4UseResolutionFallback: 0
+ ps4ReprojectionSupport: 0
+ ps4UseAudio3dBackend: 0
+ ps4UseLowGarlicFragmentationMode: 1
+ ps4SocialScreenEnabled: 0
+ ps4ScriptOptimizationLevel: 2
+ ps4Audio3dVirtualSpeakerCount: 14
+ ps4attribCpuUsage: 0
+ ps4PatchPkgPath:
+ ps4PatchLatestPkgPath:
+ ps4PatchChangeinfoPath:
+ ps4PatchDayOne: 0
+ ps4attribUserManagement: 0
+ ps4attribMoveSupport: 0
+ ps4attrib3DSupport: 0
+ ps4attribShareSupport: 0
+ ps4attribExclusiveVR: 0
+ ps4disableAutoHideSplash: 0
+ ps4videoRecordingFeaturesUsed: 0
+ ps4contentSearchFeaturesUsed: 0
+ ps4CompatibilityPS5: 0
+ ps4AllowPS5Detection: 0
+ ps4GPU800MHz: 1
+ ps4attribEyeToEyeDistanceSettingVR: 0
+ ps4IncludedModules: []
+ ps4attribVROutputEnabled: 0
+ monoEnv:
+ splashScreenBackgroundSourceLandscape: {fileID: 0}
+ splashScreenBackgroundSourcePortrait: {fileID: 0}
+ blurSplashScreenBackground: 1
+ spritePackerPolicy:
+ webGLMemorySize: 32
+ webGLExceptionSupport: 1
+ webGLNameFilesAsHashes: 0
+ webGLShowDiagnostics: 0
+ webGLDataCaching: 1
+ webGLDebugSymbols: 2
+ webGLEmscriptenArgs:
+ webGLModulesDirectory:
+ webGLTemplate: APPLICATION:Default
+ webGLAnalyzeBuildSize: 0
+ webGLUseEmbeddedResources: 0
+ webGLCompressionFormat: 1
+ webGLWasmArithmeticExceptions: 0
+ webGLLinkerTarget: 1
+ webGLThreadsSupport: 0
+ webGLDecompressionFallback: 1
+ webGLInitialMemorySize: 32
+ webGLMaximumMemorySize: 2048
+ webGLMemoryGrowthMode: 2
+ webGLMemoryLinearGrowthStep: 16
+ webGLMemoryGeometricGrowthStep: 0.2
+ webGLMemoryGeometricGrowthCap: 96
+ webGLPowerPreference: 2
+ scriptingDefineSymbols: {}
+ additionalCompilerArguments: {}
+ platformArchitecture: {}
+ scriptingBackend: {}
+ il2cppCompilerConfiguration: {}
+ il2cppCodeGeneration: {}
+ managedStrippingLevel:
+ EmbeddedLinux: 1
+ GameCoreScarlett: 1
+ GameCoreXboxOne: 1
+ Nintendo Switch: 1
+ PS4: 1
+ PS5: 1
+ QNX: 1
+ Stadia: 1
+ WebGL: 1
+ Windows Store Apps: 1
+ XboxOne: 1
+ iPhone: 1
+ tvOS: 1
+ incrementalIl2cppBuild: {}
+ suppressCommonWarnings: 1
+ allowUnsafeCode: 0
+ useDeterministicCompilation: 1
+ selectedPlatform: 2
+ additionalIl2CppArgs:
+ scriptingRuntimeVersion: 1
+ gcIncremental: 1
+ gcWBarrierValidation: 0
+ apiCompatibilityLevelPerPlatform: {}
+ m_RenderingPath: 1
+ m_MobileRenderingPath: 1
+ metroPackageName: Vibration.Upm.Embedded
+ metroPackageVersion:
+ metroCertificatePath:
+ metroCertificatePassword:
+ metroCertificateSubject:
+ metroCertificateIssuer:
+ metroCertificateNotAfter: 0000000000000000
+ metroApplicationDescription: Vibration.Upm.Embedded
+ wsaImages: {}
+ metroTileShortName:
+ metroTileShowName: 0
+ metroMediumTileShowName: 0
+ metroLargeTileShowName: 0
+ metroWideTileShowName: 0
+ metroSupportStreamingInstall: 0
+ metroLastRequiredScene: 0
+ metroDefaultTileSize: 1
+ metroTileForegroundText: 2
+ metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
+ metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1}
+ metroSplashScreenUseBackgroundColor: 0
+ platformCapabilities: {}
+ metroTargetDeviceFamilies: {}
+ metroFTAName:
+ metroFTAFileTypes: []
+ metroProtocolName:
+ vcxProjDefaultLanguage:
+ XboxOneProductId:
+ XboxOneUpdateKey:
+ XboxOneSandboxId:
+ XboxOneContentId:
+ XboxOneTitleId:
+ XboxOneSCId:
+ XboxOneGameOsOverridePath:
+ XboxOnePackagingOverridePath:
+ XboxOneAppManifestOverridePath:
+ XboxOneVersion: 1.0.0.0
+ XboxOnePackageEncryption: 0
+ XboxOnePackageUpdateGranularity: 2
+ XboxOneDescription:
+ XboxOneLanguage:
+ - enus
+ XboxOneCapability: []
+ XboxOneGameRating: {}
+ XboxOneIsContentPackage: 0
+ XboxOneEnhancedXboxCompatibilityMode: 0
+ XboxOneEnableGPUVariability: 1
+ XboxOneSockets: {}
+ XboxOneSplashScreen: {fileID: 0}
+ XboxOneAllowedProductIds: []
+ XboxOnePersistentLocalStorageSize: 0
+ XboxOneXTitleMemory: 8
+ XboxOneOverrideIdentityName:
+ XboxOneOverrideIdentityPublisher:
+ vrEditorSettings: {}
+ cloudServicesEnabled: {}
+ luminIcon:
+ m_Name:
+ m_ModelFolderPath:
+ m_PortalFolderPath:
+ luminCert:
+ m_CertPath:
+ m_SignPackage: 1
+ luminIsChannelApp: 0
+ luminVersion:
+ m_VersionCode: 1
+ m_VersionName:
+ hmiPlayerDataPath:
+ hmiForceSRGBBlit: 1
+ embeddedLinuxEnableGamepadInput: 1
+ hmiLogStartupTiming: 0
+ hmiCpuConfiguration:
+ apiCompatibilityLevel: 6
+ activeInputHandler: 0
+ windowsGamepadBackendHint: 0
+ cloudProjectId:
+ framebufferDepthMemorylessMode: 0
+ qualitySettingsNames: []
+ projectName:
+ organizationId:
+ cloudEnabled: 0
+ legacyClampBlendShapeWeights: 0
+ hmiLoadingImage: {fileID: 0}
+ platformRequiresReadableAssets: 0
+ virtualTexturingSupportEnabled: 0
+ insecureHttpOption: 2
diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt
new file mode 100644
index 0000000..8fcd994
--- /dev/null
+++ b/ProjectSettings/ProjectVersion.txt
@@ -0,0 +1,2 @@
+m_EditorVersion: 2022.3.1f1
+m_EditorVersionWithRevision: 2022.3.1f1 (f18e0c1b5784)
diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset
new file mode 100644
index 0000000..bcd6706
--- /dev/null
+++ b/ProjectSettings/QualitySettings.asset
@@ -0,0 +1,239 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!47 &1
+QualitySettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 5
+ m_CurrentQuality: 5
+ m_QualitySettings:
+ - serializedVersion: 2
+ name: Very Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 15
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 1
+ textureQuality: 1
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.3
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.4
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 16
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Medium
+ pixelLightCount: 1
+ shadows: 1
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 1
+ lodBias: 0.7
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 64
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: High
+ pixelLightCount: 2
+ shadows: 2
+ shadowResolution: 1
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 40
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 256
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Very High
+ pixelLightCount: 3
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 70
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 4
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1.5
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 1024
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Ultra
+ pixelLightCount: 4
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 4
+ shadowDistance: 150
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 255
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 2
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4096
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ m_PerPlatformDefaultQuality:
+ Android: 2
+ Lumin: 5
+ GameCoreScarlett: 5
+ GameCoreXboxOne: 5
+ Nintendo Switch: 5
+ PS4: 5
+ PS5: 5
+ Stadia: 5
+ Standalone: 5
+ WebGL: 3
+ Windows Store Apps: 5
+ XboxOne: 5
+ iPhone: 2
+ tvOS: 2
diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json
new file mode 100644
index 0000000..0449fe4
--- /dev/null
+++ b/ProjectSettings/SceneTemplateSettings.json
@@ -0,0 +1,167 @@
+{
+ "templatePinStates": [],
+ "dependencyTypeInfos": [
+ {
+ "userAdded": false,
+ "type": "UnityEngine.AnimationClip",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEditor.Animations.AnimatorController",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.AnimatorOverrideController",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEditor.Audio.AudioMixerController",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.ComputeShader",
+ "ignore": true,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Cubemap",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.GameObject",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEditor.LightingDataAsset",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": false
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.LightingSettings",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Material",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEditor.MonoScript",
+ "ignore": true,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.PhysicMaterial",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.PhysicsMaterial2D",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Rendering.VolumeProfile",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEditor.SceneAsset",
+ "ignore": false,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Shader",
+ "ignore": true,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.ShaderVariantCollection",
+ "ignore": true,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Texture",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Texture2D",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ },
+ {
+ "userAdded": false,
+ "type": "UnityEngine.Timeline.TimelineAsset",
+ "ignore": false,
+ "defaultInstantiationMode": 0,
+ "supportsModification": true
+ }
+ ],
+ "defaultDependencyTypeInfo": {
+ "userAdded": false,
+ "type": "",
+ "ignore": false,
+ "defaultInstantiationMode": 1,
+ "supportsModification": true
+ },
+ "newSceneOverride": 0
+}
\ No newline at end of file
diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset
new file mode 100644
index 0000000..1c92a78
--- /dev/null
+++ b/ProjectSettings/TagManager.asset
@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!78 &1
+TagManager:
+ serializedVersion: 2
+ tags: []
+ layers:
+ - Default
+ - TransparentFX
+ - Ignore Raycast
+ -
+ - Water
+ - UI
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ m_SortingLayers:
+ - name: Default
+ uniqueID: 0
+ locked: 0
diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset
new file mode 100644
index 0000000..558a017
--- /dev/null
+++ b/ProjectSettings/TimeManager.asset
@@ -0,0 +1,9 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!5 &1
+TimeManager:
+ m_ObjectHideFlags: 0
+ Fixed Timestep: 0.02
+ Maximum Allowed Timestep: 0.33333334
+ m_TimeScale: 1
+ Maximum Particle Timestep: 0.03
diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset
new file mode 100644
index 0000000..a88bee0
--- /dev/null
+++ b/ProjectSettings/UnityConnectSettings.asset
@@ -0,0 +1,36 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!310 &1
+UnityConnectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 1
+ m_Enabled: 0
+ m_TestMode: 0
+ m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
+ m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
+ m_ConfigUrl: https://config.uca.cloud.unity3d.com
+ m_DashboardUrl: https://dashboard.unity3d.com
+ m_TestInitMode: 0
+ CrashReportingSettings:
+ m_EventUrl: https://perf-events.cloud.unity3d.com
+ m_Enabled: 0
+ m_LogBufferSize: 10
+ m_CaptureEditorExceptions: 1
+ UnityPurchasingSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ UnityAnalyticsSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ m_InitializeOnStartup: 1
+ m_PackageRequiringCoreStatsPresent: 0
+ UnityAdsSettings:
+ m_Enabled: 0
+ m_InitializeOnStartup: 1
+ m_TestMode: 0
+ m_IosGameId:
+ m_AndroidGameId:
+ m_GameIds: {}
+ m_GameId:
+ PerformanceReportingSettings:
+ m_Enabled: 0
diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset
new file mode 100644
index 0000000..46f38e1
--- /dev/null
+++ b/ProjectSettings/VFXManager.asset
@@ -0,0 +1,14 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!937362698 &1
+VFXManager:
+ m_ObjectHideFlags: 0
+ m_IndirectShader: {fileID: 0}
+ m_CopyBufferShader: {fileID: 0}
+ m_SortShader: {fileID: 0}
+ m_StripUpdateShader: {fileID: 0}
+ m_RenderPipeSettingsPath:
+ m_FixedTimeStep: 0.016666668
+ m_MaxDeltaTime: 0.05
+ m_CompiledVersion: 0
+ m_RuntimeVersion: 0
diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset
new file mode 100644
index 0000000..dca2881
--- /dev/null
+++ b/ProjectSettings/VersionControlSettings.asset
@@ -0,0 +1,8 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!890905787 &1
+VersionControlSettings:
+ m_ObjectHideFlags: 0
+ m_Mode: Visible Meta Files
+ m_CollabEditorSettings:
+ inProgressEnabled: 1
diff --git a/ProjectSettings/XRSettings.asset b/ProjectSettings/XRSettings.asset
new file mode 100644
index 0000000..482590c
--- /dev/null
+++ b/ProjectSettings/XRSettings.asset
@@ -0,0 +1,10 @@
+{
+ "m_SettingKeys": [
+ "VR Device Disabled",
+ "VR Device User Alert"
+ ],
+ "m_SettingValues": [
+ "False",
+ "False"
+ ]
+}
\ No newline at end of file
diff --git a/Runtime/Plugins/WebGL/vibration.jslib b/Runtime/Plugins/WebGL/vibration.jslib
deleted file mode 100644
index 039b13a..0000000
--- a/Runtime/Plugins/WebGL/vibration.jslib
+++ /dev/null
@@ -1,70 +0,0 @@
-mergeInto(LibraryManager.library, {
- Vibrate: function (milliseconds = 0, typeValue = -2) {
- const vibrationType = VibrationType.getByValue(typeValue);
-
- if (vibrationType) {
-
- if (vibrationType.composition) {
- try {
- vibrationType.composition();
- return;
- } catch (error) {}
- }
-
- milliseconds = vibrationType.duration || vibrationType.pattern || milliseconds;
- }
-
- if (navigator.isVibrateSupported()) {
- const result = navigator.vibrate(milliseconds);
-
- if (result) {
- const millisecondsResult = Array.isArray(milliseconds) ? `[${milliseconds}]` : milliseconds;
- console.log(`[VibrationPlugin] Vibration with result: '${millisecondsResult}'`);
- }
- }
- },
-
- VibrateWithPattern: function (pattern = [], patternSize = 0, typeValue = -2) {
- let intPattern = [];
- const vibrationType = VibrationType.getByValue(typeValue);
-
- if (vibrationType.composition) {
- try {
- vibrationType.composition();
- return;
- } catch (error) {}
- }
-
- if (vibrationType && vibrationType.pattern && vibrationType.pattern.length > 0) {
- intPattern = vibrationType.pattern;
- } else {
-
- for(var i = 0; i < patternSize; i++) {
- const value = HEAPU32[(pattern >> 2) + i];
- intPattern.push(value);
- }
-
- console.log(`[VibrationPlugin] Converted from: [${pattern}] to pattern: ['${intPattern}]'`);
- }
-
- if (navigator.isVibrateSupported()) {
- const result = navigator.vibrate(intPattern);
-
- if (result) {
- console.log(`[VibrationPlugin] Vibration with result: '[${intPattern}]'`);
- }
- }
- },
-
- VibrateCancel: function () {
- if (!navigator.isVibrateSupported()) {
- return;
- }
-
- const result = navigator.vibrate([]);
-
- if (result) {
- console.log('[VibrationPlugin] Cancelled last vibration');
- }
- },
-});
diff --git a/Samples/VibrationExample/VibrationExample.cs b/Samples/VibrationExample/VibrationExample.cs
deleted file mode 100644
index 5e85db5..0000000
--- a/Samples/VibrationExample/VibrationExample.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// @author Benoît Freslon @benoitfreslon
-// https://github.com/BenoitFreslon/Vibration
-// https://benoitfreslon.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using UnityEngine;
-using UnityEngine.UI;
-
-public class VibrationExample : MonoBehaviour
-{
- public Text inputTime;
- public Text inputPattern;
- public Text inputRepeat;
- public Text txtAndroidVersion;
-
-<<<<<<<< HEAD:Samples/VibrationExample/VibrationExample.cs
-========
- // Use this for initialization
- void Start ()
- {
- Vibration.Init ();
- Debug.Log ( "Application.isMobilePlatform: " + Application.isMobilePlatform );
- txtAndroidVersion.text = "Android Version: " + Vibration.AndroidVersion.ToString ();
- }
-
- // Update is called once per frame
- void Update ()
- {
-
- }
-
->>>>>>>> master:Vibration/Example/VibrationExample.cs
- public void TapVibrate ()
- {
- Vibration.Vibrate ();
- }
-
- public void TapVibrateCustom ()
- {
-#if UNITY_ANDROID
- Vibration.VibrateAndroid ( int.Parse ( inputTime.text ) );
-#endif
- }
-
- public void TapVibratePattern ()
- {
- string[] patterns = inputPattern.text.Replace ( " ", "" ).Split ( ',' );
- long[] longs = Array.ConvertAll ( patterns, long.Parse );
-
- Debug.Log ( longs.Length );
- //Vibration.Vibrate ( longs, int.Parse ( inputRepeat.text ) );
-#if UNITY_ANDROID
- Vibration.VibrateAndroid ( longs, int.Parse ( inputRepeat.text ) );
-#endif
- }
-
- public void TapCancelVibrate ()
- {
-#if UNITY_ANDROID
- Vibration.CancelAndroid();
-#endif
- }
-
- public void TapPopVibrate ()
- {
- Vibration.VibratePop ();
- }
-
- public void TapPeekVibrate ()
- {
- Vibration.VibratePeek ();
- }
-
- public void TapNopeVibrate ()
- {
- Vibration.VibrateNope ();
- }
-}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..8addb87
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,455 @@
+{
+ "name": "com.benoitfreslon.vibration.example-project",
+ "version": "0.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "com.benoitfreslon.vibration.example-project",
+ "version": "0.0.1",
+ "license": "MIT",
+ "devDependencies": {
+ "http-server": "^14.1.1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "dev": true,
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/basic-auth": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
+ "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "5.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/corser": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
+ "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
+ "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
+ "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true,
+ "bin": {
+ "he": "bin/he"
+ }
+ },
+ "node_modules/html-encoding-sniffer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
+ "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
+ "dev": true,
+ "dependencies": {
+ "whatwg-encoding": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "dependencies": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/http-server": {
+ "version": "14.1.1",
+ "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz",
+ "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==",
+ "dev": true,
+ "dependencies": {
+ "basic-auth": "^2.0.1",
+ "chalk": "^4.1.2",
+ "corser": "^2.0.1",
+ "he": "^1.2.0",
+ "html-encoding-sniffer": "^3.0.0",
+ "http-proxy": "^1.18.1",
+ "mime": "^1.6.0",
+ "minimist": "^1.2.6",
+ "opener": "^1.5.1",
+ "portfinder": "^1.0.28",
+ "secure-compare": "3.0.1",
+ "union": "~0.5.0",
+ "url-join": "^4.0.1"
+ },
+ "bin": {
+ "http-server": "bin/http-server"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dev": true,
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true,
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/object-inspect": {
+ "version": "1.12.3",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
+ "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/opener": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
+ "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
+ "dev": true,
+ "bin": {
+ "opener": "bin/opener-bin.js"
+ }
+ },
+ "node_modules/portfinder": {
+ "version": "1.0.32",
+ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
+ "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
+ "dev": true,
+ "dependencies": {
+ "async": "^2.6.4",
+ "debug": "^3.2.7",
+ "mkdirp": "^0.5.6"
+ },
+ "engines": {
+ "node": ">= 0.12.0"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.11.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
+ "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
+ "dev": true,
+ "dependencies": {
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "node_modules/secure-compare": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz",
+ "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==",
+ "dev": true
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/union": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
+ "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
+ "dev": true,
+ "dependencies": {
+ "qs": "^6.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/url-join": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
+ "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==",
+ "dev": true
+ },
+ "node_modules/whatwg-encoding": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
+ "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
+ "dev": true,
+ "dependencies": {
+ "iconv-lite": "0.6.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index de5cb8d..f461a6e 100644
--- a/package.json
+++ b/package.json
@@ -1,20 +1,24 @@
{
- "name": "com.benoitfreslon.vibration",
- "author": "Benoit Freslon, AminSojoudi, SH42913",
- "displayName": "Vibration",
- "description": "Native free plugin for Unity for iOS and Android. Use custom vibrations on mobile.",
- "unity": "2019.3",
- "version": "0.1.0",
- "keywords": [],
- "repository": {
- "type": "git",
- "url": "https://github.com/BenoitFreslon/Vibration"
- },
- "samples": [
- {
- "displayName": "Vibration Example",
- "description": "A basic scene with vibration example",
- "path": "Samples~/VibrationExample"
- }
- ]
+ "name": "com.benoitfreslon.vibration.example-project",
+ "version": "0.0.1",
+ "description": "An example/demo project to develop and test the Vibration plugin",
+ "main": "index.js",
+ "scripts": {
+ "start": "http-server ./Builds/WebGL -c-1 --gzip",
+ "start:ghpage": "http-server ./demo -c-1 --gzip",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/BenoitFreslon/Vibration.git"
+ },
+ "author": "Benoit Freslon, AminSojoudi, SH42913",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/BenoitFreslon/Vibration/issues"
+ },
+ "homepage": "https://github.com/BenoitFreslon/Vibration#readme",
+ "devDependencies": {
+ "http-server": "^14.1.1"
+ }
}