diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fb41242 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,379 @@ +name: release + +on: + push: + branches: + - main + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + UnityProjectPath: ${{ steps.vars.outputs.UnityProjectPath }} + UnityPackageRoot: ${{ steps.vars.outputs.UnityPackageRoot }} + InstallerProjectPath: ${{ steps.vars.outputs.InstallerProjectPath }} + InstallerFileName: ${{ steps.vars.outputs.InstallerFileName }} + InstallerExportMethod: ${{ steps.vars.outputs.InstallerExportMethod }} + InstallerUnityVersion: ${{ steps.vars.outputs.InstallerUnityVersion }} + steps: + - id: vars + run: | + echo "UnityProjectPath=./Unity-Package" >> $GITHUB_OUTPUT + echo "UnityPackageRoot=./Assets/root" >> $GITHUB_OUTPUT + echo "InstallerProjectPath=./Installer" >> $GITHUB_OUTPUT + echo "InstallerFileName=Gyroscope-Parallax-Installer" >> $GITHUB_OUTPUT + echo "InstallerExportMethod=com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.PackageExporter.ExportPackage" >> $GITHUB_OUTPUT + echo "InstallerUnityVersion=2020.3.36f1" >> $GITHUB_OUTPUT + + check-version-tag: + needs: setup + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.current-version }} + prev_tag: ${{ steps.prev_tag.outputs.tag }} + tag_exists: ${{ steps.tag_exists.outputs.exists }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Get version from package.json + id: get_version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + with: + path: ${{ needs.setup.outputs.UnityProjectPath }}/${{ needs.setup.outputs.UnityPackageRoot }} + + - name: Find previous version tag + id: prev_tag + uses: WyriHaximus/github-action-get-previous-tag@v1 + + - name: Check if tag exists + id: tag_exists + uses: mukunku/tag-exists-action@v1.6.0 + with: + tag: ${{ steps.get_version.outputs.current-version }} + + build-unity-installer: + runs-on: [ubuntu-latest] + needs: [setup, check-version-tag] + if: needs.check-version-tag.outputs.tag_exists == 'false' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache Unity Library + uses: actions/cache@v4 + with: + path: ${{ needs.setup.outputs.InstallerProjectPath }}/Library + key: Library-Unity-Installer + + - name: Test Unity Installer (EditMode) + uses: game-ci/unity-test-runner@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + projectPath: ${{ needs.setup.outputs.InstallerProjectPath }} + unityVersion: ${{ needs.setup.outputs.InstallerUnityVersion }} + customImage: 'unityci/editor:ubuntu-${{ needs.setup.outputs.InstallerUnityVersion }}-base-3' + testMode: editmode + githubToken: ${{ secrets.GITHUB_TOKEN }} + checkName: Unity Installer EditMode Test Results + artifactsPath: artifacts-installer-editmode + customParameters: -CI true -GITHUB_ACTIONS true + + - name: Clean Unity artifacts and reset git state + run: | + # Force remove Unity generated files with restricted permissions + sudo rm -rf ${{ needs.setup.outputs.InstallerProjectPath }}/Logs/ || true + sudo rm -rf ${{ needs.setup.outputs.InstallerProjectPath }}/Temp/ || true + sudo rm -rf ./artifacts-installer-editmode/ || true + + # Reset only tracked files to their committed state + git reset --hard HEAD + echo "Cleaned Unity artifacts and reset tracked files" + + - name: Export Unity Package + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + projectPath: ${{ needs.setup.outputs.InstallerProjectPath }} + unityVersion: ${{ needs.setup.outputs.InstallerUnityVersion }} + customImage: 'unityci/editor:ubuntu-${{ needs.setup.outputs.InstallerUnityVersion }}-base-3' + buildName: ${{ needs.setup.outputs.InstallerFileName }} + buildsPath: build + buildMethod: ${{ needs.setup.outputs.InstallerExportMethod }} + customParameters: -CI true -GITHUB_ACTIONS true + + - name: Upload Unity Package as artifact + uses: actions/upload-artifact@v4 + with: + name: unity-installer-package + path: ${{ needs.setup.outputs.InstallerProjectPath }}/build/${{ needs.setup.outputs.InstallerFileName }}.unitypackage + + # --- UNITY TESTS --- + # ------------------- + + # --- EDIT MODE --- + + test-unity-2019-4-40f1-editmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2020-3-48f1-editmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2021-3-45f1-editmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2022-3-62f1-editmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'editmode' + secrets: inherit + + test-unity-6000-0-58f1-editmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'editmode' + secrets: inherit + + # --- PLAY MODE --- + + test-unity-2019-4-40f1-playmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2020-3-48f1-playmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2021-3-45f1-playmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2022-3-62f1-playmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'playmode' + secrets: inherit + + test-unity-6000-0-58f1-playmode: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'playmode' + secrets: inherit + + # --- STANDALONE --- + + test-unity-2019-4-40f1-standalone: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2020-3-48f1-standalone: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2021-3-45f1-standalone: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2022-3-62f1-standalone: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'standalone' + secrets: inherit + + test-unity-6000-0-58f1-standalone: + needs: [setup, build-unity-installer] + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'standalone' + secrets: inherit + + # ------------------- + + release-unity-plugin: + runs-on: ubuntu-latest + needs: [ + check-version-tag, + build-unity-installer, + test-unity-2019-4-40f1-editmode, + test-unity-2019-4-40f1-playmode, + test-unity-2019-4-40f1-standalone, + test-unity-2020-3-48f1-editmode, + test-unity-2020-3-48f1-playmode, + test-unity-2020-3-48f1-standalone, + test-unity-2021-3-45f1-editmode, + test-unity-2021-3-45f1-playmode, + test-unity-2021-3-45f1-standalone, + test-unity-2022-3-62f1-editmode, + test-unity-2022-3-62f1-playmode, + test-unity-2022-3-62f1-standalone, + test-unity-6000-0-58f1-editmode, + test-unity-6000-0-58f1-playmode, + test-unity-6000-0-58f1-standalone + ] + if: needs.check-version-tag.outputs.tag_exists == 'false' + outputs: + version: ${{ needs.check-version-tag.outputs.version }} + success: ${{ steps.rel_desc.outputs.success }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Generate release description + id: rel_desc + env: + GH_TOKEN: ${{ github.token }} + run: | + set -e + version=${{ needs.check-version-tag.outputs.version }} + prev_tag=${{ needs.check-version-tag.outputs.prev_tag }} + repo_url="https://github.com/${GITHUB_REPOSITORY}" + today=$(date +'%B %e, %Y') + + echo "repo_url: $repo_url" + echo "today: $today" + + echo "# Unity Gyroscope Parallax $version" > release.md + echo "**Released:** *$today*" >> release.md + + echo "" >> release.md + echo "---" >> release.md + echo "" >> release.md + + if [ -n "$prev_tag" ]; then + echo "## Comparison" >> release.md + echo "See every change: [Compare $prev_tag...$version]($repo_url/compare/$prev_tag...$version)" >> release.md + + echo "" >> release.md + echo "---" >> release.md + echo "" >> release.md + + echo "## Commit Summary (Newest → Oldest)" >> release.md + for sha in $(git log --pretty=format:'%H' $prev_tag..HEAD); do + username=$(gh api repos/${GITHUB_REPOSITORY}/commits/$sha --jq '.author.login // .commit.author.name') + message=$(git log -1 --pretty=format:'%s' $sha) + short_sha=$(git log -1 --pretty=format:'%h' $sha) + echo "- [\`$short_sha\`]($repo_url/commit/$sha) — $message by @$username" >> release.md + done + fi + + printf "release_body<> $GITHUB_OUTPUT + echo "success=true" >> $GITHUB_OUTPUT + + - name: Create Tag and Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ needs.check-version-tag.outputs.version }} + name: ${{ needs.check-version-tag.outputs.version }} + body: ${{ steps.rel_desc.outputs.release_body }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-unity-installer: + runs-on: ubuntu-latest + needs: [setup, release-unity-plugin] + steps: + - name: Download Unity Package artifact + uses: actions/download-artifact@v4 + with: + name: unity-installer-package + path: ./ + + - name: Upload Unity Package to Release + uses: softprops/action-gh-release@v2 + with: + files: ./${{ needs.setup.outputs.InstallerFileName }}.unitypackage + tag_name: ${{ needs.release-unity-plugin.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Cleanup job to remove build artifacts after publishing + cleanup-artifacts: + runs-on: ubuntu-latest + needs: [publish-unity-installer] + if: always() + steps: + - name: Delete Unity Package artifacts + uses: geekyeggo/delete-artifact@v5 + with: + name: unity-installer-package + failOnError: false + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/test_pull_request.yml b/.github/workflows/test_pull_request.yml new file mode 100644 index 0000000..fa5ad2f --- /dev/null +++ b/.github/workflows/test_pull_request.yml @@ -0,0 +1,169 @@ +name: test-pull-request + +on: + pull_request: + branches: [main, dev] + types: [opened, synchronize, reopened] + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + UnityProjectPath: ${{ steps.vars.outputs.UnityProjectPath }} + UnityPackageRoot: ${{ steps.vars.outputs.UnityPackageRoot }} + InstallerProjectPath: ${{ steps.vars.outputs.InstallerProjectPath }} + InstallerFileName: ${{ steps.vars.outputs.InstallerFileName }} + InstallerExportMethod: ${{ steps.vars.outputs.InstallerExportMethod }} + InstallerUnityVersion: ${{ steps.vars.outputs.InstallerUnityVersion }} + steps: + - id: vars + run: | + echo "UnityProjectPath=./Unity-Package" >> $GITHUB_OUTPUT + echo "UnityPackageRoot=./Assets/root" >> $GITHUB_OUTPUT + echo "InstallerProjectPath=./Installer" >> $GITHUB_OUTPUT + echo "InstallerFileName=Gyroscope-Parallax-Installer" >> $GITHUB_OUTPUT + echo "InstallerExportMethod=com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.PackageExporter.ExportPackage" >> $GITHUB_OUTPUT + echo "InstallerUnityVersion=2020.3.36f1" >> $GITHUB_OUTPUT + + # --- EDIT MODE --- + + test-unity-2019-4-40f1-editmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2020-3-48f1-editmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2021-3-45f1-editmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'editmode' + secrets: inherit + + test-unity-2022-3-62f1-editmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'editmode' + secrets: inherit + + test-unity-6000-0-58f1-editmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'editmode' + secrets: inherit + + # --- PLAY MODE --- + + test-unity-2019-4-40f1-playmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2020-3-48f1-playmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2021-3-45f1-playmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'playmode' + secrets: inherit + + test-unity-2022-3-62f1-playmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'playmode' + secrets: inherit + + test-unity-6000-0-58f1-playmode: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'playmode' + secrets: inherit + + # --- STANDALONE --- + + test-unity-2019-4-40f1-standalone: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2019.4.40f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2020-3-48f1-standalone: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2020.3.48f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2021-3-45f1-standalone: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2021.3.45f1' + testMode: 'standalone' + secrets: inherit + + test-unity-2022-3-62f1-standalone: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '2022.3.62f1' + testMode: 'standalone' + secrets: inherit + + test-unity-6000-0-58f1-standalone: + needs: setup + uses: ./.github/workflows/test_unity_plugin.yml + with: + projectPath: ${{ needs.setup.outputs.UnityProjectPath }} + unityVersion: '6000.0.58f1' + testMode: 'standalone' + secrets: inherit + + # ------------------- \ No newline at end of file diff --git a/.github/workflows/test_unity_plugin.yml b/.github/workflows/test_unity_plugin.yml new file mode 100644 index 0000000..7fb1d0c --- /dev/null +++ b/.github/workflows/test_unity_plugin.yml @@ -0,0 +1,112 @@ +name: test-unity-plugin + +############################################################################## +# 1. Triggers +############################################################################## +on: + workflow_call: + inputs: + projectPath: { required: true, type: string } + unityVersion: { required: true, type: string } + testMode: { required: true, type: string } + secrets: + UNITY_LICENSE: { required: true } + UNITY_EMAIL: { required: true } + UNITY_PASSWORD: { required: true } + +############################################################################## +# 2. Jobs – runs only after a maintainer applies the `ci-ok` label +############################################################################## +jobs: + test: + if: | + github.event_name != 'pull_request_target' || + contains(github.event.pull_request.labels.*.name,'ci-ok') + strategy: + fail-fast: false + matrix: + include: + - os: windows + runs-on: [windows-latest] + - os: ubuntu + runs-on: [ubuntu-latest] + + name: ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.os }} + runs-on: ${{ matrix.runs-on }} + + # permissions: # minimize the default token + # contents: write + # pull-requests: write + + steps: + # --------------------------------------------------------------------- # + # 2-a. Skip Unity 2019 on Windows early + # --------------------------------------------------------------------- # + - name: Skip Unity 2019 on Windows + if: ${{ startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows' }} + run: | + echo "::notice::Unity 2019 on Windows doesn't support Docker test running - skipping tests" + exit 0 + shell: bash + + # --------------------------------------------------------------------- # + # 2-b. (PR only) abort if the contributor also changed workflow files + # --------------------------------------------------------------------- # + - name: Abort if workflow files modified + if: ${{ github.event_name == 'pull_request_target' && !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + run: | + git fetch --depth=1 origin "${{ github.base_ref }}" + if git diff --name-only HEAD origin/${{ github.base_ref }} | grep -q '^\.github/workflows/'; then + echo "::error::This PR edits workflow files – refusing to run with secrets"; exit 1; + fi + + # --------------------------------------------------------------------- # + # 2-c. Checkout the contributor's commit safely + # --------------------------------------------------------------------- # + - uses: actions/checkout@v4 + if: ${{ !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + with: + lfs: false + + # --------------------------------------------------------------------- # + # 2-c. Cache & run the Unity test-runner + # --------------------------------------------------------------------- # + - uses: actions/cache@v4 + if: ${{ !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + with: + path: | + ${{ inputs.projectPath }}/Library + ~/.cache/unity3d + key: Library-${{ inputs.unityVersion }}-${{ matrix.os }} + + # --------------------------------------------------------------------- # + - name: Generate custom image name + if: ${{ !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + id: custom_image + run: | + echo "image=unityci/editor:${{ matrix.os }}-${{ inputs.unityVersion }}-base-3" >> $GITHUB_OUTPUT + shell: bash + + - uses: game-ci/unity-test-runner@v4 + if: ${{ !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + id: tests + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + projectPath: ${{ inputs.projectPath }} + unityVersion: ${{ inputs.unityVersion }} + testMode: ${{ inputs.testMode }} + customImage: ${{ steps.custom_image.outputs.image }} + githubToken: ${{ secrets.GITHUB_TOKEN }} + checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} ${{ matrix.os }} Test Results + artifactsPath: artifacts-${{ inputs.unityVersion }}-${{ inputs.testMode }}-${{ matrix.os }} + customParameters: -CI true -GITHUB_ACTIONS true + + # --------------------------------------------------------------------- # + - uses: actions/upload-artifact@v4 + if: ${{ always() && !(startsWith(inputs.unityVersion, '2019.') && matrix.os == 'windows') }} + with: + name: Test results for ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.os }} + path: ${{ steps.tests.outputs.artifactsPath }} \ No newline at end of file diff --git a/Assets/_PackageRoot/README.md b/Assets/_PackageRoot/README.md deleted file mode 100644 index a725459..0000000 --- a/Assets/_PackageRoot/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# Unity-Gyroscope-Parallax -![npm](https://img.shields.io/npm/v/extensions.unity.gyroscope.parallax) ![License](https://img.shields.io/github/license/IvanMurzak/Unity-Gyroscope-Parallax) - -Unity Parallax based on gyroscope components. Supported fake gyroscope for simulation in Unity Editor. - -### Features -- ✔️ support legacy Input System -- ✔️ support new Input System -- ✔️ ability to simulate gyroscope in Unity Editor -- ✔️ move/rotate objects based on gyroscope -- ✔️ ability to add custom controllers - -![unity-gyroscope-parallax-small](https://user-images.githubusercontent.com/9135028/177197269-a11dd87c-3f6b-400d-bf91-01a9b051cb1b.gif) - -# GyroMover2D -Moves list of objects using gyroscope. - -![image](https://user-images.githubusercontent.com/9135028/166463235-50702210-3b09-417d-9b9a-547fce73ba15.png) ![image](https://user-images.githubusercontent.com/9135028/166465109-33274de8-84e3-44e4-a8ab-b7c1f3ea2380.png) - -![Unity_WTZrJSE6qY](https://user-images.githubusercontent.com/9135028/166468223-2992f1a9-8ead-454e-bc3a-5adaab832868.gif) - - -# GyroRotator2D -Rotates list of objects using gyroscope. - -![image](https://user-images.githubusercontent.com/9135028/176648393-cde4e34d-1c7c-4a58-9935-a5ff6081d2e7.png) - ![image](https://user-images.githubusercontent.com/9135028/166465157-5f1325f3-8109-4a35-bd91-87082aa36cf9.png) - -![Unity_CeUGRyFD5v](https://user-images.githubusercontent.com/9135028/166467361-485a1e2b-f799-4700-ada8-3982e06f2245.gif) - - - -# How to install -- Add this code to /Packages/manifest.json -```json -{ - "dependencies": { - "extensions.unity.gyroscope.parallax": "1.4.1", - }, - "scopedRegistries": [ - { - "name": "Unity Extensions", - "url": "https://registry.npmjs.org", - "scopes": [ - "extensions.unity" - ] - }, - { - "name": "NPM", - "url": "https://registry.npmjs.org", - "scopes": [ - "com.cysharp", - "com.neuecc" - ] - } - ] -} -``` - -# How to use -- add needed `Gyro...` component to any GameObject -- link Targets to list of targets -- press 'Play' button in Unity Editor -- find `Fake Gyroscope Manager` in `DonDestroyOnLoad` scene (appears in Play Mode) -- ![image](https://user-images.githubusercontent.com/9135028/166464685-b6197e8a-547d-47ab-9039-824ce29f3ca5.png) -- change XY values of `Gravity` and `Attitude` properties to simulate gyroscope in Unity Editor diff --git a/Assets/_PackageRoot/Scripts/.gitignore b/Assets/_PackageRoot/Scripts/.gitignore deleted file mode 100644 index 6427e2a..0000000 --- a/Assets/_PackageRoot/Scripts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Except this file -!.gitignore \ No newline at end of file diff --git a/Assets/_PackageRoot/package.json b/Assets/_PackageRoot/package.json deleted file mode 100644 index d51b9f3..0000000 --- a/Assets/_PackageRoot/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "extensions.unity.gyroscope.parallax", - "displayName": "Unity Gyroscope Parallax", - "author": { "name": "Ivan Murzak", "url": "https://github.com/IvanMurzak" }, - "version": "1.4.1", - "unity": "2019.2", - "description": "Unity Parallax based on gyroscope components.", - "dependencies": { - "com.cysharp.unitask": "2.3.3", - "extensions.unity.gyroscope.manager": "1.2.6" - }, - "scopedRegistries": [ - { - "name": "package.openupm.com", - "url": "https://package.openupm.com", - "scopes": [ - "extensions.unity.gyroscope.manager", - "com.cysharp", - "com.neuecc" - ] - } - ] -} \ No newline at end of file diff --git a/.gitignore b/Installer/.gitignore similarity index 100% rename from .gitignore rename to Installer/.gitignore diff --git a/Installer/.vscode/settings.json b/Installer/.vscode/settings.json new file mode 100644 index 0000000..e232cd6 --- /dev/null +++ b/Installer/.vscode/settings.json @@ -0,0 +1,55 @@ +{ + "files.exclude": + { + "**/.DS_Store":true, + "**/.git":true, + "**/.gitmodules":true, + "**/*.booproj":true, + "**/*.pidb":true, + "**/*.suo":true, + "**/*.user":true, + "**/*.userprefs":true, + "**/*.unityproj":true, + "**/*.dll":true, + "**/*.exe":true, + "**/*.pdf":true, + "**/*.mid":true, + "**/*.midi":true, + "**/*.wav":true, + "**/*.gif":true, + "**/*.ico":true, + "**/*.jpg":true, + "**/*.jpeg":true, + "**/*.png":true, + "**/*.psd":true, + "**/*.tga":true, + "**/*.tif":true, + "**/*.tiff":true, + "**/*.3ds":true, + "**/*.3DS":true, + "**/*.fbx":true, + "**/*.FBX":true, + "**/*.lxo":true, + "**/*.LXO":true, + "**/*.ma":true, + "**/*.MA":true, + "**/*.obj":true, + "**/*.OBJ":true, + "**/*.asset":true, + "**/*.cubemap":true, + "**/*.flare":true, + "**/*.mat":true, + "**/*.meta":true, + "**/*.prefab":true, + "**/*.unity":true, + "build/":true, + "Build/":true, + "Library/":true, + "library/":true, + "obj/":true, + "Obj/":true, + "ProjectSettings/":true, + "temp/":true, + "Temp/":true + } +} \ No newline at end of file diff --git a/Assets/Plugins.meta b/Installer/Assets/com.IvanMurzak.meta similarity index 77% rename from Assets/Plugins.meta rename to Installer/Assets/com.IvanMurzak.meta index 202da84..4e97834 100644 --- a/Assets/Plugins.meta +++ b/Installer/Assets/com.IvanMurzak.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 77cd0eaa80bac3a4ab1c48dd14d59041 +guid: f485f6d327a9e774ba5b1c1303c6d51d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/_PackageRoot/Editor/Scripts.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer.meta similarity index 77% rename from Assets/_PackageRoot/Editor/Scripts.meta rename to Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer.meta index c9d7039..b8c4387 100644 --- a/Assets/_PackageRoot/Editor/Scripts.meta +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b81e0125873d0b84ebb74ab70e482ee8 +guid: c9cd90b0527808748a547bf7395c1291 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs new file mode 100644 index 0000000..ee60ef7 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs @@ -0,0 +1,127 @@ +/* +┌───────────────────────────────────────────────────────────────────────────────┐ +│ Author: Ivan Murzak (https://github.com/IvanMurzak) │ +│ Repository: GitHub (https://github.com/IvanMurzak/Unity-Gyroscope-Parallax) │ +│ Copyright (c) 2025 Ivan Murzak │ +│ Licensed under the Apache License, Version 2.0. │ +│ See the LICENSE file in the project root for more information. │ +└───────────────────────────────────────────────────────────────────────────────┘ +*/ + +using System.IO; +using System.Linq; +using com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.SimpleJSON; +using UnityEngine; + +namespace com.IvanMurzak.Unity.Gyroscope.Parallax.Installer +{ + public static partial class Installer + { + static string ManifestPath => Path.Combine(Application.dataPath, "../Packages/manifest.json"); + + // Property names + public const string Dependencies = "dependencies"; + public const string ScopedRegistries = "scopedRegistries"; + public const string Name = "name"; + public const string Url = "url"; + public const string Scopes = "scopes"; + + // Property values + public const string RegistryName = "package.openupm.com"; + public const string RegistryUrl = "https://package.openupm.com"; + public static readonly string[] PackageIds = new string[] { + "com.ivanmurzak", // Ivan Murzak's OpenUPM packages + "extensions.unity", // Ivan Murzak's OpenUPM packages (older) + "org.nuget.com.ivanmurzak", // Ivan Murzak's NuGet packages + "org.nuget.microsoft", // Microsoft NuGet packages + "org.nuget.system", // Microsoft NuGet packages + "org.nuget.r3" // R3 package NuGet package + }; + + public static void AddScopedRegistryIfNeeded(string manifestPath, int indent = 2) + { + if (!File.Exists(manifestPath)) + { + Debug.LogError($"{manifestPath} not found!"); + return; + } + var jsonText = File.ReadAllText(manifestPath) + .Replace("{ }", "{\n}") + .Replace("{}", "{\n}") + .Replace("[ ]", "[\n]") + .Replace("[]", "[\n]"); + + var manifestJson = JSONObject.Parse(jsonText); + if (manifestJson == null) + { + Debug.LogError($"Failed to parse {manifestPath} as JSON."); + return; + } + + var modified = false; + + // --- Add scoped registries if needed + var scopedRegistries = manifestJson[ScopedRegistries]; + if (scopedRegistries == null) + { + manifestJson[ScopedRegistries] = new JSONArray(); + modified = true; + } + + // --- Add OpenUPM registry if needed + var openUpmRegistry = scopedRegistries.Linq + .Select(kvp => kvp.Value) + .Where(r => r.Linq + .Any(p => p.Key == Name && p.Value == RegistryName)) + .FirstOrDefault(); + + if (openUpmRegistry == null) + { + scopedRegistries.Add(openUpmRegistry = new JSONObject + { + [Name] = RegistryName, + [Url] = RegistryUrl, + [Scopes] = new JSONArray() + }); + modified = true; + } + + // --- Add missing scopes + var scopes = openUpmRegistry[Scopes]; + if (scopes == null) + { + openUpmRegistry[Scopes] = scopes = new JSONArray(); + modified = true; + } + foreach (var packageId in PackageIds) + { + var existingScope = scopes.Linq + .Select(kvp => kvp.Value) + .Where(value => value == packageId) + .FirstOrDefault(); + if (existingScope == null) + { + scopes.Add(packageId); + modified = true; + } + } + + // --- Package Dependency + var dependencies = manifestJson[Dependencies]; + if (dependencies == null) + { + manifestJson[Dependencies] = dependencies = new JSONObject(); + modified = true; + } + if (dependencies[PackageId] != Version) + { + dependencies[PackageId] = Version; + modified = true; + } + + // --- Write changes back to manifest + if (modified) + File.WriteAllText(manifestPath, manifestJson.ToString(indent).Replace("\" : ", "\": ")); + } + } +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs.meta new file mode 100644 index 0000000..d5e9d58 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.Manifest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93e67abcc341063419335007be25c67f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs new file mode 100644 index 0000000..3e0b653 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs @@ -0,0 +1,27 @@ +/* +┌───────────────────────────────────────────────────────────────────────────────┐ +│ Author: Ivan Murzak (https://github.com/IvanMurzak) │ +│ Repository: GitHub (https://github.com/IvanMurzak/Unity-Gyroscope-Parallax) │ +│ Copyright (c) 2025 Ivan Murzak │ +│ Licensed under the Apache License, Version 2.0. │ +│ See the LICENSE file in the project root for more information. │ +└───────────────────────────────────────────────────────────────────────────────┘ +*/ +using UnityEditor; + +namespace com.IvanMurzak.Unity.Gyroscope.Parallax.Installer +{ + [InitializeOnLoad] + public static partial class Installer + { + public const string PackageId = "extensions.unity.gyroscope.parallax"; + public const string Version = "1.4.1"; + + static Installer() + { +#if !IVAN_MURZAK_INSTALLER_PROJECT + AddScopedRegistryIfNeeded(ManifestPath); +#endif + } + } +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs.meta new file mode 100644 index 0000000..dc818cd --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 25684b4b8ea54d34ea4bb5c565c6bc68 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs new file mode 100644 index 0000000..0bc9128 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs @@ -0,0 +1,36 @@ +/* +┌───────────────────────────────────────────────────────────────────────────────┐ +│ Author: Ivan Murzak (https://github.com/IvanMurzak) │ +│ Repository: GitHub (https://github.com/IvanMurzak/Unity-Gyroscope-Parallax) │ +│ Copyright (c) 2025 Ivan Murzak │ +│ Licensed under the Apache License, Version 2.0. │ +│ See the LICENSE file in the project root for more information. │ +└───────────────────────────────────────────────────────────────────────────────┘ +*/ +using UnityEngine; +using UnityEditor; +using System.IO; + +namespace com.IvanMurzak.Unity.Gyroscope.Parallax.Installer +{ + public static class PackageExporter + { + public static void ExportPackage() + { + var packagePath = "Assets/com.IvanMurzak/Gyroscope Parallax Installer"; + var outputPath = "build/Gyroscope-Parallax-Installer.unitypackage"; + + // Ensure build directory exists + var buildDir = Path.GetDirectoryName(outputPath); + if (!Directory.Exists(buildDir)) + { + Directory.CreateDirectory(buildDir); + } + + // Export the package + AssetDatabase.ExportPackage(packagePath, outputPath, ExportPackageOptions.Recurse); + + Debug.Log($"Package exported to: {outputPath}"); + } + } +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs.meta new file mode 100644 index 0000000..ba2ad84 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/PackageExporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90686b0afc4cb9b499a55d318bc570a7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs new file mode 100644 index 0000000..93907ab --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs @@ -0,0 +1,1434 @@ +/* * * * * + * A simple JSON Parser / builder + * ------------------------------ + * + * It mainly has been written as a simple JSON parser. It can build a JSON string + * from the node-tree, or generate a node tree from any valid JSON string. + * + * Written by Bunny83 + * 2012-06-09 + * + * Changelog now external. See Changelog.txt + * + * The MIT License (MIT) + * + * Copyright (c) 2012-2022 Markus Göbel (Bunny83) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * * * * */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; + +namespace com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.SimpleJSON +{ + public enum JSONNodeType + { + Array = 1, + Object = 2, + String = 3, + Number = 4, + NullValue = 5, + Boolean = 6, + None = 7, + Custom = 0xFF, + } + public enum JSONTextMode + { + Compact, + Indent + } + + public abstract partial class JSONNode + { + #region Enumerators + public struct Enumerator + { + private enum Type { None, Array, Object } + private Type type; + private Dictionary.Enumerator m_Object; + private List.Enumerator m_Array; + public bool IsValid { get { return type != Type.None; } } + public Enumerator(List.Enumerator aArrayEnum) + { + type = Type.Array; + m_Object = default(Dictionary.Enumerator); + m_Array = aArrayEnum; + } + public Enumerator(Dictionary.Enumerator aDictEnum) + { + type = Type.Object; + m_Object = aDictEnum; + m_Array = default(List.Enumerator); + } + public KeyValuePair Current + { + get + { + if (type == Type.Array) + return new KeyValuePair(string.Empty, m_Array.Current); + else if (type == Type.Object) + return m_Object.Current; + return new KeyValuePair(string.Empty, null); + } + } + public bool MoveNext() + { + if (type == Type.Array) + return m_Array.MoveNext(); + else if (type == Type.Object) + return m_Object.MoveNext(); + return false; + } + } + public struct ValueEnumerator + { + private Enumerator m_Enumerator; + public ValueEnumerator(List.Enumerator aArrayEnum) : this(new Enumerator(aArrayEnum)) { } + public ValueEnumerator(Dictionary.Enumerator aDictEnum) : this(new Enumerator(aDictEnum)) { } + public ValueEnumerator(Enumerator aEnumerator) { m_Enumerator = aEnumerator; } + public JSONNode Current { get { return m_Enumerator.Current.Value; } } + public bool MoveNext() { return m_Enumerator.MoveNext(); } + public ValueEnumerator GetEnumerator() { return this; } + } + public struct KeyEnumerator + { + private Enumerator m_Enumerator; + public KeyEnumerator(List.Enumerator aArrayEnum) : this(new Enumerator(aArrayEnum)) { } + public KeyEnumerator(Dictionary.Enumerator aDictEnum) : this(new Enumerator(aDictEnum)) { } + public KeyEnumerator(Enumerator aEnumerator) { m_Enumerator = aEnumerator; } + public string Current { get { return m_Enumerator.Current.Key; } } + public bool MoveNext() { return m_Enumerator.MoveNext(); } + public KeyEnumerator GetEnumerator() { return this; } + } + + public class LinqEnumerator : IEnumerator>, IEnumerable> + { + private JSONNode m_Node; + private Enumerator m_Enumerator; + internal LinqEnumerator(JSONNode aNode) + { + m_Node = aNode; + if (m_Node != null) + m_Enumerator = m_Node.GetEnumerator(); + } + public KeyValuePair Current { get { return m_Enumerator.Current; } } + object IEnumerator.Current { get { return m_Enumerator.Current; } } + public bool MoveNext() { return m_Enumerator.MoveNext(); } + + public void Dispose() + { + m_Node = null; + m_Enumerator = new Enumerator(); + } + + public IEnumerator> GetEnumerator() + { + return new LinqEnumerator(m_Node); + } + + public void Reset() + { + if (m_Node != null) + m_Enumerator = m_Node.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return new LinqEnumerator(m_Node); + } + } + + #endregion Enumerators + + #region common interface + + public static bool forceASCII = false; // Use Unicode by default + public static bool longAsString = false; // lazy creator creates a JSONString instead of JSONNumber + public static bool allowLineComments = true; // allow "//"-style comments at the end of a line + + public abstract JSONNodeType Tag { get; } + + public virtual JSONNode this[int aIndex] { get { return null; } set { } } + + public virtual JSONNode this[string aKey] { get { return null; } set { } } + + public virtual string Value { get { return ""; } set { } } + + public virtual int Count { get { return 0; } } + + public virtual bool IsNumber { get { return false; } } + public virtual bool IsString { get { return false; } } + public virtual bool IsBoolean { get { return false; } } + public virtual bool IsNull { get { return false; } } + public virtual bool IsArray { get { return false; } } + public virtual bool IsObject { get { return false; } } + + public virtual bool Inline { get { return false; } set { } } + + public virtual void Add(string aKey, JSONNode aItem) + { + } + public virtual void Add(JSONNode aItem) + { + Add("", aItem); + } + + public virtual JSONNode Remove(string aKey) + { + return null; + } + + public virtual JSONNode Remove(int aIndex) + { + return null; + } + + public virtual JSONNode Remove(JSONNode aNode) + { + return aNode; + } + public virtual void Clear() { } + + public virtual JSONNode Clone() + { + return null; + } + + public virtual IEnumerable Children + { + get + { + yield break; + } + } + + public IEnumerable DeepChildren + { + get + { + foreach (var C in Children) + foreach (var D in C.DeepChildren) + yield return D; + } + } + + public virtual bool HasKey(string aKey) + { + return false; + } + + public virtual JSONNode GetValueOrDefault(string aKey, JSONNode aDefault) + { + return aDefault; + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + WriteToStringBuilder(sb, 0, 0, JSONTextMode.Compact); + return sb.ToString(); + } + + public virtual string ToString(int aIndent) + { + StringBuilder sb = new StringBuilder(); + WriteToStringBuilder(sb, 0, aIndent, JSONTextMode.Indent); + return sb.ToString(); + } + internal abstract void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode); + + public abstract Enumerator GetEnumerator(); + public IEnumerable> Linq { get { return new LinqEnumerator(this); } } + public KeyEnumerator Keys { get { return new KeyEnumerator(GetEnumerator()); } } + public ValueEnumerator Values { get { return new ValueEnumerator(GetEnumerator()); } } + + #endregion common interface + + #region typecasting properties + + + public virtual double AsDouble + { + get + { + double v = 0.0; + if (double.TryParse(Value, NumberStyles.Float, CultureInfo.InvariantCulture, out v)) + return v; + return 0.0; + } + set + { + Value = value.ToString(CultureInfo.InvariantCulture); + } + } + + public virtual int AsInt + { + get { return (int)AsDouble; } + set { AsDouble = value; } + } + + public virtual float AsFloat + { + get { return (float)AsDouble; } + set { AsDouble = value; } + } + + public virtual bool AsBool + { + get + { + bool v = false; + if (bool.TryParse(Value, out v)) + return v; + return !string.IsNullOrEmpty(Value); + } + set + { + Value = (value) ? "true" : "false"; + } + } + + public virtual long AsLong + { + get + { + long val = 0; + if (long.TryParse(Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out val)) + return val; + return 0L; + } + set + { + Value = value.ToString(CultureInfo.InvariantCulture); + } + } + + public virtual ulong AsULong + { + get + { + ulong val = 0; + if (ulong.TryParse(Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out val)) + return val; + return 0; + } + set + { + Value = value.ToString(CultureInfo.InvariantCulture); + } + } + + public virtual JSONArray AsArray + { + get + { + return this as JSONArray; + } + } + + public virtual JSONObject AsObject + { + get + { + return this as JSONObject; + } + } + + + #endregion typecasting properties + + #region operators + + public static implicit operator JSONNode(string s) + { + return (s == null) ? (JSONNode)JSONNull.CreateOrGet() : new JSONString(s); + } + public static implicit operator string(JSONNode d) + { + return (d == null) ? null : d.Value; + } + + public static implicit operator JSONNode(double n) + { + return new JSONNumber(n); + } + public static implicit operator double(JSONNode d) + { + return (d == null) ? 0 : d.AsDouble; + } + + public static implicit operator JSONNode(float n) + { + return new JSONNumber(n); + } + public static implicit operator float(JSONNode d) + { + return (d == null) ? 0 : d.AsFloat; + } + + public static implicit operator JSONNode(int n) + { + return new JSONNumber(n); + } + public static implicit operator int(JSONNode d) + { + return (d == null) ? 0 : d.AsInt; + } + + public static implicit operator JSONNode(long n) + { + if (longAsString) + return new JSONString(n.ToString(CultureInfo.InvariantCulture)); + return new JSONNumber(n); + } + public static implicit operator long(JSONNode d) + { + return (d == null) ? 0L : d.AsLong; + } + + public static implicit operator JSONNode(ulong n) + { + if (longAsString) + return new JSONString(n.ToString(CultureInfo.InvariantCulture)); + return new JSONNumber(n); + } + public static implicit operator ulong(JSONNode d) + { + return (d == null) ? 0 : d.AsULong; + } + + public static implicit operator JSONNode(bool b) + { + return new JSONBool(b); + } + public static implicit operator bool(JSONNode d) + { + return (d == null) ? false : d.AsBool; + } + + public static implicit operator JSONNode(KeyValuePair aKeyValue) + { + return aKeyValue.Value; + } + + public static bool operator ==(JSONNode a, object b) + { + if (ReferenceEquals(a, b)) + return true; + bool aIsNull = a is JSONNull || ReferenceEquals(a, null) || a is JSONLazyCreator; + bool bIsNull = b is JSONNull || ReferenceEquals(b, null) || b is JSONLazyCreator; + if (aIsNull && bIsNull) + return true; + return !aIsNull && a.Equals(b); + } + + public static bool operator !=(JSONNode a, object b) + { + return !(a == b); + } + + public override bool Equals(object obj) + { + return ReferenceEquals(this, obj); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion operators + + [ThreadStatic] + private static StringBuilder m_EscapeBuilder; + internal static StringBuilder EscapeBuilder + { + get + { + if (m_EscapeBuilder == null) + m_EscapeBuilder = new StringBuilder(); + return m_EscapeBuilder; + } + } + internal static string Escape(string aText) + { + var sb = EscapeBuilder; + sb.Length = 0; + if (sb.Capacity < aText.Length + aText.Length / 10) + sb.Capacity = aText.Length + aText.Length / 10; + foreach (char c in aText) + { + switch (c) + { + case '\\': + sb.Append("\\\\"); + break; + case '\"': + sb.Append("\\\""); + break; + case '\n': + sb.Append("\\n"); + break; + case '\r': + sb.Append("\\r"); + break; + case '\t': + sb.Append("\\t"); + break; + case '\b': + sb.Append("\\b"); + break; + case '\f': + sb.Append("\\f"); + break; + default: + if (c < ' ' || (forceASCII && c > 127)) + { + ushort val = c; + sb.Append("\\u").Append(val.ToString("X4")); + } + else + sb.Append(c); + break; + } + } + string result = sb.ToString(); + sb.Length = 0; + return result; + } + + private static JSONNode ParseElement(string token, bool quoted) + { + if (quoted) + return token; + if (token.Length <= 5) + { + string tmp = token.ToLower(); + if (tmp == "false" || tmp == "true") + return tmp == "true"; + if (tmp == "null") + return JSONNull.CreateOrGet(); + } + double val; + if (double.TryParse(token, NumberStyles.Float, CultureInfo.InvariantCulture, out val)) + return val; + else + return token; + } + + public static JSONNode Parse(string aJSON) + { + Stack stack = new Stack(); + JSONNode ctx = null; + int i = 0; + StringBuilder Token = new StringBuilder(); + string TokenName = ""; + bool QuoteMode = false; + bool TokenIsQuoted = false; + bool HasNewlineChar = false; + while (i < aJSON.Length) + { + switch (aJSON[i]) + { + case '{': + if (QuoteMode) + { + Token.Append(aJSON[i]); + break; + } + stack.Push(new JSONObject()); + if (ctx != null) + { + ctx.Add(TokenName, stack.Peek()); + } + TokenName = ""; + Token.Length = 0; + ctx = stack.Peek(); + HasNewlineChar = false; + break; + + case '[': + if (QuoteMode) + { + Token.Append(aJSON[i]); + break; + } + + stack.Push(new JSONArray()); + if (ctx != null) + { + ctx.Add(TokenName, stack.Peek()); + } + TokenName = ""; + Token.Length = 0; + ctx = stack.Peek(); + HasNewlineChar = false; + break; + + case '}': + case ']': + if (QuoteMode) + { + + Token.Append(aJSON[i]); + break; + } + if (stack.Count == 0) + throw new Exception("JSON Parse: Too many closing brackets"); + + stack.Pop(); + if (Token.Length > 0 || TokenIsQuoted) + ctx.Add(TokenName, ParseElement(Token.ToString(), TokenIsQuoted)); + if (ctx != null) + ctx.Inline = !HasNewlineChar; + TokenIsQuoted = false; + TokenName = ""; + Token.Length = 0; + if (stack.Count > 0) + ctx = stack.Peek(); + break; + + case ':': + if (QuoteMode) + { + Token.Append(aJSON[i]); + break; + } + TokenName = Token.ToString(); + Token.Length = 0; + TokenIsQuoted = false; + break; + + case '"': + QuoteMode ^= true; + TokenIsQuoted |= QuoteMode; + break; + + case ',': + if (QuoteMode) + { + Token.Append(aJSON[i]); + break; + } + if (Token.Length > 0 || TokenIsQuoted) + ctx.Add(TokenName, ParseElement(Token.ToString(), TokenIsQuoted)); + TokenIsQuoted = false; + TokenName = ""; + Token.Length = 0; + TokenIsQuoted = false; + break; + + case '\r': + case '\n': + HasNewlineChar = true; + break; + + case ' ': + case '\t': + if (QuoteMode) + Token.Append(aJSON[i]); + break; + + case '\\': + ++i; + if (QuoteMode) + { + char C = aJSON[i]; + switch (C) + { + case 't': + Token.Append('\t'); + break; + case 'r': + Token.Append('\r'); + break; + case 'n': + Token.Append('\n'); + break; + case 'b': + Token.Append('\b'); + break; + case 'f': + Token.Append('\f'); + break; + case 'u': + { + string s = aJSON.Substring(i + 1, 4); + Token.Append((char)int.Parse( + s, + System.Globalization.NumberStyles.AllowHexSpecifier)); + i += 4; + break; + } + default: + Token.Append(C); + break; + } + } + break; + case '/': + if (allowLineComments && !QuoteMode && i + 1 < aJSON.Length && aJSON[i + 1] == '/') + { + while (++i < aJSON.Length && aJSON[i] != '\n' && aJSON[i] != '\r') ; + break; + } + Token.Append(aJSON[i]); + break; + case '\uFEFF': // remove / ignore BOM (Byte Order Mark) + break; + + default: + Token.Append(aJSON[i]); + break; + } + ++i; + } + if (QuoteMode) + { + throw new Exception("JSON Parse: Quotation marks seems to be messed up."); + } + if (ctx == null) + return ParseElement(Token.ToString(), TokenIsQuoted); + return ctx; + } + + } + // End of JSONNode + + public partial class JSONArray : JSONNode + { + private List m_List = new List(); + private bool inline = false; + public override bool Inline + { + get { return inline; } + set { inline = value; } + } + + public override JSONNodeType Tag { get { return JSONNodeType.Array; } } + public override bool IsArray { get { return true; } } + public override Enumerator GetEnumerator() { return new Enumerator(m_List.GetEnumerator()); } + + public override JSONNode this[int aIndex] + { + get + { + if (aIndex < 0 || aIndex >= m_List.Count) + return new JSONLazyCreator(this); + return m_List[aIndex]; + } + set + { + if (value == null) + value = JSONNull.CreateOrGet(); + if (aIndex < 0 || aIndex >= m_List.Count) + m_List.Add(value); + else + m_List[aIndex] = value; + } + } + + public override JSONNode this[string aKey] + { + get { return new JSONLazyCreator(this); } + set + { + if (value == null) + value = JSONNull.CreateOrGet(); + m_List.Add(value); + } + } + + public override int Count + { + get { return m_List.Count; } + } + + public override void Add(string aKey, JSONNode aItem) + { + if (aItem == null) + aItem = JSONNull.CreateOrGet(); + m_List.Add(aItem); + } + + public override JSONNode Remove(int aIndex) + { + if (aIndex < 0 || aIndex >= m_List.Count) + return null; + JSONNode tmp = m_List[aIndex]; + m_List.RemoveAt(aIndex); + return tmp; + } + + public override JSONNode Remove(JSONNode aNode) + { + m_List.Remove(aNode); + return aNode; + } + + public override void Clear() + { + m_List.Clear(); + } + + public override JSONNode Clone() + { + var node = new JSONArray(); + node.m_List.Capacity = m_List.Capacity; + foreach (var n in m_List) + { + if (n != null) + node.Add(n.Clone()); + else + node.Add(null); + } + return node; + } + + public override IEnumerable Children + { + get + { + foreach (JSONNode N in m_List) + yield return N; + } + } + + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append('['); + int count = m_List.Count; + if (inline) + aMode = JSONTextMode.Compact; + for (int i = 0; i < count; i++) + { + if (i > 0) + aSB.Append(','); + if (aMode == JSONTextMode.Indent) + aSB.AppendLine(); + + if (aMode == JSONTextMode.Indent) + aSB.Append(' ', aIndent + aIndentInc); + m_List[i].WriteToStringBuilder(aSB, aIndent + aIndentInc, aIndentInc, aMode); + } + if (aMode == JSONTextMode.Indent) + aSB.AppendLine().Append(' ', aIndent); + aSB.Append(']'); + } + } + // End of JSONArray + + public partial class JSONObject : JSONNode + { + private Dictionary m_Dict = new Dictionary(); + + private bool inline = false; + public override bool Inline + { + get { return inline; } + set { inline = value; } + } + + public override JSONNodeType Tag { get { return JSONNodeType.Object; } } + public override bool IsObject { get { return true; } } + + public override Enumerator GetEnumerator() { return new Enumerator(m_Dict.GetEnumerator()); } + + + public override JSONNode this[string aKey] + { + get + { + if (m_Dict.TryGetValue(aKey, out JSONNode outJsonNode)) + return outJsonNode; + else + return new JSONLazyCreator(this, aKey); + } + set + { + if (value == null) + value = JSONNull.CreateOrGet(); + if (m_Dict.ContainsKey(aKey)) + m_Dict[aKey] = value; + else + m_Dict.Add(aKey, value); + } + } + + public override JSONNode this[int aIndex] + { + get + { + if (aIndex < 0 || aIndex >= m_Dict.Count) + return null; + return m_Dict.ElementAt(aIndex).Value; + } + set + { + if (value == null) + value = JSONNull.CreateOrGet(); + if (aIndex < 0 || aIndex >= m_Dict.Count) + return; + string key = m_Dict.ElementAt(aIndex).Key; + m_Dict[key] = value; + } + } + + public override int Count + { + get { return m_Dict.Count; } + } + + public override void Add(string aKey, JSONNode aItem) + { + if (aItem == null) + aItem = JSONNull.CreateOrGet(); + + if (aKey != null) + { + if (m_Dict.ContainsKey(aKey)) + m_Dict[aKey] = aItem; + else + m_Dict.Add(aKey, aItem); + } + else + m_Dict.Add(Guid.NewGuid().ToString(), aItem); + } + + public override JSONNode Remove(string aKey) + { + if (!m_Dict.ContainsKey(aKey)) + return null; + JSONNode tmp = m_Dict[aKey]; + m_Dict.Remove(aKey); + return tmp; + } + + public override JSONNode Remove(int aIndex) + { + if (aIndex < 0 || aIndex >= m_Dict.Count) + return null; + var item = m_Dict.ElementAt(aIndex); + m_Dict.Remove(item.Key); + return item.Value; + } + + public override JSONNode Remove(JSONNode aNode) + { + try + { + var item = m_Dict.Where(k => k.Value == aNode).First(); + m_Dict.Remove(item.Key); + return aNode; + } + catch + { + return null; + } + } + + public override void Clear() + { + m_Dict.Clear(); + } + + public override JSONNode Clone() + { + var node = new JSONObject(); + foreach (var n in m_Dict) + { + node.Add(n.Key, n.Value.Clone()); + } + return node; + } + + public override bool HasKey(string aKey) + { + return m_Dict.ContainsKey(aKey); + } + + public override JSONNode GetValueOrDefault(string aKey, JSONNode aDefault) + { + JSONNode res; + if (m_Dict.TryGetValue(aKey, out res)) + return res; + return aDefault; + } + + public override IEnumerable Children + { + get + { + foreach (KeyValuePair N in m_Dict) + yield return N.Value; + } + } + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append('{'); + bool first = true; + if (inline) + aMode = JSONTextMode.Compact; + foreach (var k in m_Dict) + { + if (!first) + aSB.Append(','); + first = false; + if (aMode == JSONTextMode.Indent) + aSB.AppendLine(); + if (aMode == JSONTextMode.Indent) + aSB.Append(' ', aIndent + aIndentInc); + aSB.Append('\"').Append(Escape(k.Key)).Append('\"'); + if (aMode == JSONTextMode.Compact) + aSB.Append(':'); + else + aSB.Append(" : "); + k.Value.WriteToStringBuilder(aSB, aIndent + aIndentInc, aIndentInc, aMode); + } + if (aMode == JSONTextMode.Indent) + aSB.AppendLine().Append(' ', aIndent); + aSB.Append('}'); + } + + } + // End of JSONObject + + public partial class JSONString : JSONNode + { + private string m_Data; + + public override JSONNodeType Tag { get { return JSONNodeType.String; } } + public override bool IsString { get { return true; } } + + public override Enumerator GetEnumerator() { return new Enumerator(); } + + + public override string Value + { + get { return m_Data; } + set + { + m_Data = value; + } + } + + public JSONString(string aData) + { + m_Data = aData; + } + public override JSONNode Clone() + { + return new JSONString(m_Data); + } + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append('\"').Append(Escape(m_Data)).Append('\"'); + } + public override bool Equals(object obj) + { + if (base.Equals(obj)) + return true; + string s = obj as string; + if (s != null) + return m_Data == s; + JSONString s2 = obj as JSONString; + if (s2 != null) + return m_Data == s2.m_Data; + return false; + } + public override int GetHashCode() + { + return m_Data.GetHashCode(); + } + public override void Clear() + { + m_Data = ""; + } + } + // End of JSONString + + public partial class JSONNumber : JSONNode + { + private double m_Data; + + public override JSONNodeType Tag { get { return JSONNodeType.Number; } } + public override bool IsNumber { get { return true; } } + public override Enumerator GetEnumerator() { return new Enumerator(); } + + public override string Value + { + get { return m_Data.ToString(CultureInfo.InvariantCulture); } + set + { + double v; + if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out v)) + m_Data = v; + } + } + + public override double AsDouble + { + get { return m_Data; } + set { m_Data = value; } + } + public override long AsLong + { + get { return (long)m_Data; } + set { m_Data = value; } + } + public override ulong AsULong + { + get { return (ulong)m_Data; } + set { m_Data = value; } + } + + public JSONNumber(double aData) + { + m_Data = aData; + } + + public JSONNumber(string aData) + { + Value = aData; + } + + public override JSONNode Clone() + { + return new JSONNumber(m_Data); + } + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append(Value.ToString(CultureInfo.InvariantCulture)); + } + private static bool IsNumeric(object value) + { + return value is int || value is uint + || value is float || value is double + || value is decimal + || value is long || value is ulong + || value is short || value is ushort + || value is sbyte || value is byte; + } + public override bool Equals(object obj) + { + if (obj == null) + return false; + if (base.Equals(obj)) + return true; + JSONNumber s2 = obj as JSONNumber; + if (s2 != null) + return m_Data == s2.m_Data; + if (IsNumeric(obj)) + return Convert.ToDouble(obj) == m_Data; + return false; + } + public override int GetHashCode() + { + return m_Data.GetHashCode(); + } + public override void Clear() + { + m_Data = 0; + } + } + // End of JSONNumber + + public partial class JSONBool : JSONNode + { + private bool m_Data; + + public override JSONNodeType Tag { get { return JSONNodeType.Boolean; } } + public override bool IsBoolean { get { return true; } } + public override Enumerator GetEnumerator() { return new Enumerator(); } + + public override string Value + { + get { return m_Data.ToString(); } + set + { + bool v; + if (bool.TryParse(value, out v)) + m_Data = v; + } + } + public override bool AsBool + { + get { return m_Data; } + set { m_Data = value; } + } + + public JSONBool(bool aData) + { + m_Data = aData; + } + + public JSONBool(string aData) + { + Value = aData; + } + + public override JSONNode Clone() + { + return new JSONBool(m_Data); + } + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append((m_Data) ? "true" : "false"); + } + public override bool Equals(object obj) + { + if (obj == null) + return false; + if (obj is bool) + return m_Data == (bool)obj; + return false; + } + public override int GetHashCode() + { + return m_Data.GetHashCode(); + } + public override void Clear() + { + m_Data = false; + } + } + // End of JSONBool + + public partial class JSONNull : JSONNode + { + static JSONNull m_StaticInstance = new JSONNull(); + public static bool reuseSameInstance = true; + public static JSONNull CreateOrGet() + { + if (reuseSameInstance) + return m_StaticInstance; + return new JSONNull(); + } + private JSONNull() { } + + public override JSONNodeType Tag { get { return JSONNodeType.NullValue; } } + public override bool IsNull { get { return true; } } + public override Enumerator GetEnumerator() { return new Enumerator(); } + + public override string Value + { + get { return "null"; } + set { } + } + public override bool AsBool + { + get { return false; } + set { } + } + + public override JSONNode Clone() + { + return CreateOrGet(); + } + + public override bool Equals(object obj) + { + if (object.ReferenceEquals(this, obj)) + return true; + return (obj is JSONNull); + } + public override int GetHashCode() + { + return 0; + } + + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append("null"); + } + } + // End of JSONNull + + internal partial class JSONLazyCreator : JSONNode + { + private JSONNode m_Node = null; + private string m_Key = null; + public override JSONNodeType Tag { get { return JSONNodeType.None; } } + public override Enumerator GetEnumerator() { return new Enumerator(); } + + public JSONLazyCreator(JSONNode aNode) + { + m_Node = aNode; + m_Key = null; + } + + public JSONLazyCreator(JSONNode aNode, string aKey) + { + m_Node = aNode; + m_Key = aKey; + } + + private T Set(T aVal) where T : JSONNode + { + if (m_Key == null) + m_Node.Add(aVal); + else + m_Node.Add(m_Key, aVal); + m_Node = null; // Be GC friendly. + return aVal; + } + + public override JSONNode this[int aIndex] + { + get { return new JSONLazyCreator(this); } + set { Set(new JSONArray()).Add(value); } + } + + public override JSONNode this[string aKey] + { + get { return new JSONLazyCreator(this, aKey); } + set { Set(new JSONObject()).Add(aKey, value); } + } + + public override void Add(JSONNode aItem) + { + Set(new JSONArray()).Add(aItem); + } + + public override void Add(string aKey, JSONNode aItem) + { + Set(new JSONObject()).Add(aKey, aItem); + } + + public static bool operator ==(JSONLazyCreator a, object b) + { + if (b == null) + return true; + return System.Object.ReferenceEquals(a, b); + } + + public static bool operator !=(JSONLazyCreator a, object b) + { + return !(a == b); + } + + public override bool Equals(object obj) + { + if (obj == null) + return true; + return System.Object.ReferenceEquals(this, obj); + } + + public override int GetHashCode() + { + return 0; + } + + public override int AsInt + { + get { Set(new JSONNumber(0)); return 0; } + set { Set(new JSONNumber(value)); } + } + + public override float AsFloat + { + get { Set(new JSONNumber(0.0f)); return 0.0f; } + set { Set(new JSONNumber(value)); } + } + + public override double AsDouble + { + get { Set(new JSONNumber(0.0)); return 0.0; } + set { Set(new JSONNumber(value)); } + } + + public override long AsLong + { + get + { + if (longAsString) + Set(new JSONString("0")); + else + Set(new JSONNumber(0.0)); + return 0L; + } + set + { + if (longAsString) + Set(new JSONString(value.ToString(CultureInfo.InvariantCulture))); + else + Set(new JSONNumber(value)); + } + } + + public override ulong AsULong + { + get + { + if (longAsString) + Set(new JSONString("0")); + else + Set(new JSONNumber(0.0)); + return 0L; + } + set + { + if (longAsString) + Set(new JSONString(value.ToString(CultureInfo.InvariantCulture))); + else + Set(new JSONNumber(value)); + } + } + + public override bool AsBool + { + get { Set(new JSONBool(false)); return false; } + set { Set(new JSONBool(value)); } + } + + public override JSONArray AsArray + { + get { return Set(new JSONArray()); } + } + + public override JSONObject AsObject + { + get { return Set(new JSONObject()); } + } + internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode) + { + aSB.Append("null"); + } + } + // End of JSONLazyCreator + + public static class JSON + { + public static JSONNode Parse(string aJSON) + { + return JSONNode.Parse(aJSON); + } + } +} diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs.meta new file mode 100644 index 0000000..8703956 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/SimpleJSON.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9f9bed3885e591b499a1b75bc9e5b01c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests.meta new file mode 100644 index 0000000..d5b827f --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 04785ffbcb8ec52419c7d792b1ad116e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files.meta new file mode 100644 index 0000000..9d12a4b --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f22463278f83adb47b40eb06460e3262 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct.meta new file mode 100644 index 0000000..efe000e --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a8eb423f32f9be43b98d08f13982249 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json new file mode 100644 index 0000000..2334066 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json @@ -0,0 +1,33 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity", + "org.nuget.com.ivanmurzak", + "org.nuget.microsoft", + "org.nuget.system", + "org.nuget.r3" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json.meta new file mode 100644 index 0000000..a168ae1 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/Correct/correct_manifest.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c33de74d379cef941a595a605d7c7f81 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json new file mode 100644 index 0000000..f94ad81 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json @@ -0,0 +1,20 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json.meta new file mode 100644 index 0000000..d87b621 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_1.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8976df1464dad4242aeb4bfc43c1bf4b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json new file mode 100644 index 0000000..f94ad81 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json @@ -0,0 +1,20 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json.meta new file mode 100644 index 0000000..0e350a6 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_empty_2.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8a52d1fee4f9bfe4bb5d45386409ae11 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json new file mode 100644 index 0000000..bcdb7a6 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json @@ -0,0 +1,19 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + } +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json.meta new file mode 100644 index 0000000..38bfc41 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopedregistries_gone.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 57d8f909a31b969488c66deaaff0afef +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json new file mode 100644 index 0000000..c556ab4 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json @@ -0,0 +1,26 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json.meta new file mode 100644 index 0000000..fbe8bfe --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_empty.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a16f7809b0ae57d42a08c6ed0f491966 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json new file mode 100644 index 0000000..5b0829d --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json @@ -0,0 +1,25 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com" + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json.meta new file mode 100644 index 0000000..8cb5695 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_gone.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6debe614a90266f489480196378462a2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json new file mode 100644 index 0000000..ecd2092 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json @@ -0,0 +1,32 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity", + "org.nuget.com.ivanmurzak", + "org.nuget.microsoft", + "org.nuget.system" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json.meta new file mode 100644 index 0000000..cba51bb --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_1.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf8e4210df2744147a5104073b97aed6 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json new file mode 100644 index 0000000..dca084f --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json @@ -0,0 +1,31 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity", + "org.nuget.com.ivanmurzak", + "org.nuget.microsoft" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json.meta new file mode 100644 index 0000000..5303c0b --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_2.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 54f76f23b51fb6a40825cba7d7f7ae53 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json new file mode 100644 index 0000000..5a2d1a0 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json @@ -0,0 +1,30 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity", + "org.nuget.com.ivanmurzak" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json.meta new file mode 100644 index 0000000..662413e --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_3.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d403ed04e7a5d484bade1096fcda2924 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json new file mode 100644 index 0000000..1ce5ba4 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json @@ -0,0 +1,29 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json.meta new file mode 100644 index 0000000..c603002 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_4.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b9556cf8473b49649a8ad21413ea2207 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json new file mode 100644 index 0000000..18b1858 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json @@ -0,0 +1,28 @@ +{ + "dependencies": { + "com.unity.ide.visualstudio": "2.0.23", + "com.unity.test-framework": "1.1.33", + "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", + "org.nuget.microsoft.aspnetcore.signalr.client": "9.0.7", + "org.nuget.microsoft.aspnetcore.signalr.protocols.json": "9.0.7", + "org.nuget.microsoft.bcl.memory": "9.0.7", + "org.nuget.microsoft.codeanalysis.csharp": "4.13.0", + "org.nuget.microsoft.extensions.caching.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.dependencyinjection.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.hosting": "9.0.7", + "org.nuget.microsoft.extensions.hosting.abstractions": "9.0.7", + "org.nuget.microsoft.extensions.logging.abstractions": "9.0.7", + "org.nuget.r3": "1.3.0", + "org.nuget.system.text.json": "9.0.7", + "PACKAGE_ID": "PACKAGE_VERSION" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak" + ] + } + ] +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json.meta new file mode 100644 index 0000000..b7a0359 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files/scopes_partial_5.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4d5b965c87b02114b842243f86a03670 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs new file mode 100644 index 0000000..29bd58c --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs @@ -0,0 +1,71 @@ +/* +┌──────────────────────────────────────────────────────────────────┐ +│ Author: Ivan Murzak (https://github.com/IvanMurzak) │ +│ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │ +│ Copyright (c) 2025 Ivan Murzak │ +│ Licensed under the Apache License, Version 2.0. │ +│ See the LICENSE file in the project root for more information. │ +└──────────────────────────────────────────────────────────────────┘ +*/ +using System.IO; +using NUnit.Framework; +using UnityEngine; + +namespace com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests +{ + public class ManifestInstallerTests + { + const string PackageIdTag = "PACKAGE_ID"; + const string PackageVersionTag = "PACKAGE_VERSION"; + const string FilesRoot = "Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files"; + const string FilesCopyRoot = "Temp/com.IvanMurzak/Gyroscope Parallax Installer/Tests/Files"; + static string CorrectManifestPath => $"{FilesRoot}/Correct/correct_manifest.json"; + + [SetUp] + public void SetUp() + { + Debug.Log($"[{nameof(ManifestInstallerTests)}] SetUp"); + Directory.CreateDirectory(FilesCopyRoot); + } + + [TearDown] + public void TearDown() + { + Debug.Log($"[{nameof(ManifestInstallerTests)}] TearDown"); + + // var files = Directory.GetFiles(FilesCopyRoot, "*.json", SearchOption.TopDirectoryOnly); + // foreach (var file in files) + // File.Delete(file); + } + + [Test] + public void All() + { + var files = Directory.GetFiles(FilesRoot, "*.json", SearchOption.TopDirectoryOnly); + var correctManifest = File.ReadAllText(CorrectManifestPath) + .Replace(PackageVersionTag, Installer.Version) + .Replace(PackageIdTag, Installer.PackageId); + + foreach (var file in files) + { + Debug.Log($"Found JSON file: {file}"); + + // Copy the file + var fileCopy = Path.Combine(FilesCopyRoot, Path.GetFileName(file)); + File.Copy(file, fileCopy, overwrite: true); + + // Arrange + File.WriteAllText(fileCopy, File.ReadAllText(fileCopy) + .Replace(PackageVersionTag, Installer.Version) + .Replace(PackageIdTag, Installer.PackageId)); + + // Act + Installer.AddScopedRegistryIfNeeded(fileCopy); + + // Assert + var modifiedManifest = File.ReadAllText(fileCopy); + Assert.AreEqual(correctManifest, modifiedManifest, $"Modified manifest from {file} does not match the correct manifest."); + } + } + } +} diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs.meta new file mode 100644 index 0000000..bd86102 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/ManifestInstallerTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9dcf1c9368a962644a95cc949d80cea4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef new file mode 100644 index 0000000..47e6185 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef @@ -0,0 +1,22 @@ +{ + "name": "com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests", + "rootNamespace": "com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests", + "references": [ + "com.IvanMurzak.Unity.Gyroscope.Parallax.Installer" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef.meta new file mode 100644 index 0000000..caa3040 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Tests/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e8ee104e2c4b6e44ebf5ada55d92ce3f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef new file mode 100644 index 0000000..8f9cdf1 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef @@ -0,0 +1,16 @@ +{ + "name": "com.IvanMurzak.Unity.Gyroscope.Parallax.Installer", + "rootNamespace": "com.IvanMurzak.Unity.Gyroscope.Parallax.Installer", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef.meta b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef.meta new file mode 100644 index 0000000..a634f98 --- /dev/null +++ b/Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/com.IvanMurzak.Unity.Gyroscope.Parallax.Installer.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6257c06db93b1b4419144b775b07cd3c +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Installer/Packages/manifest.json b/Installer/Packages/manifest.json new file mode 100644 index 0000000..5648c92 --- /dev/null +++ b/Installer/Packages/manifest.json @@ -0,0 +1,19 @@ +{ + "dependencies": { + "com.unity.test-framework": "1.1.33" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "com.ivanmurzak", + "extensions.unity", + "org.nuget.com.ivanmurzak", + "org.nuget.microsoft", + "org.nuget.system", + "org.nuget.r3" + ] + } + ] +} diff --git a/Installer/Packages/packages-lock.json b/Installer/Packages/packages-lock.json new file mode 100644 index 0000000..5d383dc --- /dev/null +++ b/Installer/Packages/packages-lock.json @@ -0,0 +1,34 @@ +{ + "dependencies": { + "com.unity.ext.nunit": { + "version": "1.0.6", + "depth": 1, + "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.modules.imgui": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + } + } +} diff --git a/ProjectSettings/AudioManager.asset b/Installer/ProjectSettings/AudioManager.asset similarity index 100% rename from ProjectSettings/AudioManager.asset rename to Installer/ProjectSettings/AudioManager.asset diff --git a/ProjectSettings/ClusterInputManager.asset b/Installer/ProjectSettings/ClusterInputManager.asset similarity index 100% rename from ProjectSettings/ClusterInputManager.asset rename to Installer/ProjectSettings/ClusterInputManager.asset diff --git a/ProjectSettings/DynamicsManager.asset b/Installer/ProjectSettings/DynamicsManager.asset similarity index 100% rename from ProjectSettings/DynamicsManager.asset rename to Installer/ProjectSettings/DynamicsManager.asset diff --git a/Installer/ProjectSettings/EditorBuildSettings.asset b/Installer/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..0147887 --- /dev/null +++ b/Installer/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: [] + m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/Installer/ProjectSettings/EditorSettings.asset similarity index 97% rename from ProjectSettings/EditorSettings.asset rename to Installer/ProjectSettings/EditorSettings.asset index 03cf3e3..8ff4b82 100644 --- a/ProjectSettings/EditorSettings.asset +++ b/Installer/ProjectSettings/EditorSettings.asset @@ -38,3 +38,4 @@ EditorSettings: m_CacheServerEnableUpload: 1 m_CacheServerEnableAuth: 0 m_CacheServerEnableTls: 0 + m_CacheServerValidationMode: 2 diff --git a/ProjectSettings/GraphicsSettings.asset b/Installer/ProjectSettings/GraphicsSettings.asset similarity index 100% rename from ProjectSettings/GraphicsSettings.asset rename to Installer/ProjectSettings/GraphicsSettings.asset diff --git a/ProjectSettings/InputManager.asset b/Installer/ProjectSettings/InputManager.asset similarity index 100% rename from ProjectSettings/InputManager.asset rename to Installer/ProjectSettings/InputManager.asset diff --git a/ProjectSettings/NavMeshAreas.asset b/Installer/ProjectSettings/NavMeshAreas.asset similarity index 100% rename from ProjectSettings/NavMeshAreas.asset rename to Installer/ProjectSettings/NavMeshAreas.asset diff --git a/ProjectSettings/PackageManagerSettings.asset b/Installer/ProjectSettings/PackageManagerSettings.asset similarity index 61% rename from ProjectSettings/PackageManagerSettings.asset rename to Installer/ProjectSettings/PackageManagerSettings.asset index b4e1ec4..2d42cf3 100644 --- a/ProjectSettings/PackageManagerSettings.asset +++ b/Installer/ProjectSettings/PackageManagerSettings.asset @@ -24,19 +24,16 @@ MonoBehaviour: m_Scopes: [] m_IsDefault: 1 m_Capabilities: 7 - - m_Id: scoped:Unity Extensions - m_Name: Unity Extensions - m_Url: https://registry.npmjs.org + - m_Id: scoped:package.openupm.com + m_Name: package.openupm.com + m_Url: https://package.openupm.com m_Scopes: + - com.ivanmurzak - extensions.unity - m_IsDefault: 0 - m_Capabilities: 0 - - m_Id: scoped:NPM - m_Name: NPM - m_Url: https://registry.npmjs.org - m_Scopes: - - com.cysharp - - com.neuecc + - org.nuget.com.ivanmurzak + - org.nuget.microsoft + - org.nuget.system + - org.nuget.r3 m_IsDefault: 0 m_Capabilities: 0 m_UserSelectedRegistryName: @@ -44,16 +41,26 @@ MonoBehaviour: m_RegistryInfoDraft: m_ErrorMessage: m_Original: - m_Id: scoped:Unity Extensions - m_Name: Unity Extensions - m_Url: https://registry.npmjs.org + m_Id: scoped:package.openupm.com + m_Name: package.openupm.com + m_Url: https://package.openupm.com m_Scopes: + - com.ivanmurzak - extensions.unity + - org.nuget.com.ivanmurzak + - org.nuget.microsoft + - org.nuget.system + - org.nuget.r3 m_IsDefault: 0 m_Capabilities: 0 m_Modified: 0 - m_Name: Unity Extensions - m_Url: https://registry.npmjs.org + m_Name: package.openupm.com + m_Url: https://package.openupm.com m_Scopes: + - com.ivanmurzak - extensions.unity + - org.nuget.com.ivanmurzak + - org.nuget.microsoft + - org.nuget.system + - org.nuget.r3 m_SelectedScopeIndex: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/Installer/ProjectSettings/Physics2DSettings.asset similarity index 100% rename from ProjectSettings/Physics2DSettings.asset rename to Installer/ProjectSettings/Physics2DSettings.asset diff --git a/ProjectSettings/PresetManager.asset b/Installer/ProjectSettings/PresetManager.asset similarity index 100% rename from ProjectSettings/PresetManager.asset rename to Installer/ProjectSettings/PresetManager.asset diff --git a/Installer/ProjectSettings/ProjectSettings.asset b/Installer/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..4c22f65 --- /dev/null +++ b/Installer/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,631 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 22 + productGUID: 8d97bf1c8c2fe614db49799e19cb7c3c + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: DefaultCompany + productName: Installer + 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: 0 + m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + iosUseCustomAppBackgroundBehavior: 0 + iosAllowHTTPDownload: 1 + 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 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + stadiaPresentMode: 0 + stadiaTargetFramerate: 0 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + m_SupportedAspectRatios: + 4:3: 1 + 5:4: 1 + 16:10: 1 + 16:9: 1 + Others: 1 + bundleVersion: 1.0 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + isWsaHolographicRemotingEnabled: 0 + enableFrameTimingStats: 0 + useHDRDisplay: 0 + D3DHDRBitDepth: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: + Standalone: com.DefaultCompany.Installer + buildNumber: + Standalone: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 0 + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 19 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + APKExpansionFiles: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 0 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSTargetOSVersionString: 11.0 + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 11.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: [] + 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: 00000000000000000000000000000000 + templatePackageId: + templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + 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 + AndroidMinifyWithR8: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: [] + m_BuildTargetGraphicsJobs: [] + m_BuildTargetGraphicsJobMode: [] + m_BuildTargetGraphicsAPIs: [] + m_BuildTargetVRSettings: [] + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetNormalMapEncoding: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + 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 + switchTouchScreenUsage: 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 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 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: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + 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 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 0 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + scriptingDefineSymbols: + 1: IVAN_MURZAK_INSTALLER_PROJECT + additionalCompilerArguments: {} + platformArchitecture: {} + scriptingBackend: {} + il2cppCompilerConfiguration: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + useReferenceAssemblies: 1 + enableRoslynAnalyzers: 1 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + assemblyVersionValidation: 1 + gcWBarrierValidation: 0 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: Installer + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: Installer + 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: + apiCompatibilityLevel: 6 + activeInputHandler: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 0 + virtualTexturingSupportEnabled: 0 diff --git a/Installer/ProjectSettings/ProjectVersion.txt b/Installer/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..4c19129 --- /dev/null +++ b/Installer/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2019.4.40f1 +m_EditorVersionWithRevision: 2019.4.40f1 (ffc62b691db5) diff --git a/ProjectSettings/QualitySettings.asset b/Installer/ProjectSettings/QualitySettings.asset similarity index 100% rename from ProjectSettings/QualitySettings.asset rename to Installer/ProjectSettings/QualitySettings.asset diff --git a/ProjectSettings/TagManager.asset b/Installer/ProjectSettings/TagManager.asset similarity index 100% rename from ProjectSettings/TagManager.asset rename to Installer/ProjectSettings/TagManager.asset diff --git a/ProjectSettings/TimeManager.asset b/Installer/ProjectSettings/TimeManager.asset similarity index 100% rename from ProjectSettings/TimeManager.asset rename to Installer/ProjectSettings/TimeManager.asset diff --git a/ProjectSettings/UnityConnectSettings.asset b/Installer/ProjectSettings/UnityConnectSettings.asset similarity index 100% rename from ProjectSettings/UnityConnectSettings.asset rename to Installer/ProjectSettings/UnityConnectSettings.asset diff --git a/ProjectSettings/VFXManager.asset b/Installer/ProjectSettings/VFXManager.asset similarity index 100% rename from ProjectSettings/VFXManager.asset rename to Installer/ProjectSettings/VFXManager.asset diff --git a/ProjectSettings/VersionControlSettings.asset b/Installer/ProjectSettings/VersionControlSettings.asset similarity index 100% rename from ProjectSettings/VersionControlSettings.asset rename to Installer/ProjectSettings/VersionControlSettings.asset diff --git a/Installer/ProjectSettings/XRSettings.asset b/Installer/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000..482590c --- /dev/null +++ b/Installer/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/Installer/UserSettings/EditorUserSettings.asset b/Installer/UserSettings/EditorUserSettings.asset new file mode 100644 index 0000000..d2ce6fb --- /dev/null +++ b/Installer/UserSettings/EditorUserSettings.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!162 &1 +EditorUserSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_ConfigSettings: + vcSharedLogLevel: + value: 0d5e400f0650 + flags: 0 + m_VCAutomaticAdd: 1 + m_VCDebugCom: 0 + m_VCDebugCmd: 0 + m_VCDebugOut: 0 + m_SemanticMergeMode: 2 + m_VCShowFailedCheckout: 1 + m_VCOverwriteFailedCheckoutAssets: 1 + m_VCProjectOverlayIcons: 1 + m_VCHierarchyOverlayIcons: 1 + m_VCOtherOverlayIcons: 1 + m_VCAllowAsyncUpdate: 1 diff --git a/LICENSE b/LICENSE index be36368..4e88c79 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Ivan Murzak +Copyright (c) 2025 Ivan Murzak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Packages/manifest.json b/Packages/manifest.json deleted file mode 100644 index d324b17..0000000 --- a/Packages/manifest.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "dependencies": { - "com.cysharp.unitask": "2.3.3", - "com.unity.2d.sprite": "1.0.0", - "com.unity.ide.visualstudio": "2.0.16", - "com.unity.ide.vscode": "1.2.5", - "com.unity.timeline": "1.4.8", - "com.unity.ugui": "1.0.0", - "extensions.unity.gyroscope.manager": "1.2.6", - "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" - }, - "scopedRegistries": [ - { - "name": "package.openupm.com", - "url": "https://package.openupm.com", - "scopes": [ - "extensions.unity.gyroscope.manager", - "com.cysharp", - "com.neuecc" - ] - } - ] -} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json deleted file mode 100644 index b3c8b84..0000000 --- a/Packages/packages-lock.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "dependencies": { - "com.cysharp.unitask": { - "version": "2.2.5", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://registry.npmjs.org" - }, - "com.unity.2d.sprite": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.ext.nunit": { - "version": "1.0.6", - "depth": 2, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.ide.visualstudio": { - "version": "2.0.16", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.9" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ide.vscode": { - "version": "1.2.5", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.test-framework": { - "version": "1.1.31", - "depth": 1, - "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.timeline": { - "version": "1.4.8", - "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" - } - }, - "extensions.unity.gyroscope.manager": { - "version": "1.2.6", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://registry.npmjs.org" - }, - "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.uielementsnative": "1.0.0" - } - }, - "com.unity.modules.uielementsnative": { - "version": "1.0.0", - "depth": 1, - "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/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt deleted file mode 100644 index 0a52d40..0000000 --- a/ProjectSettings/ProjectVersion.txt +++ /dev/null @@ -1,2 +0,0 @@ -m_EditorVersion: 2020.3.36f1 -m_EditorVersionWithRevision: 2020.3.36f1 (71f96b79b9f0) diff --git a/README.md b/README.md index 78324ab..8deca91 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,83 @@ -# Unity-Gyroscope-Parallax -![npm](https://img.shields.io/npm/v/extensions.unity.gyroscope.parallax) [![openupm](https://img.shields.io/npm/v/extensions.unity.gyroscope.parallax?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/extensions.unity.gyroscope.parallax/) ![License](https://img.shields.io/github/license/IvanMurzak/Unity-Gyroscope-Parallax) [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) +# [Unity Gyroscope Parallax](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax) + +[![OpenUPM](https://img.shields.io/npm/v/extensions.unity.gyroscope.parallax?label=OpenUPM®istry_uri=https://package.openupm.com&labelColor=333A41 'OpenUPM package')](https://openupm.com/packages/extensions.unity.gyroscope.parallax/) +[![Unity Asset Store](https://img.shields.io/badge/Asset%20Store-View-blue?logo=unity&labelColor=333A41 'Asset Store')](https://u3d.as/3E42) +[![Unity Editor](https://img.shields.io/badge/Editor-X?style=flat&logo=unity&labelColor=333A41&color=49BC5C 'Unity Editor supported')](https://unity.com/releases/editor/archive) +[![Unity Runtime](https://img.shields.io/badge/Runtime-X?style=flat&logo=unity&labelColor=333A41&color=49BC5C 'Unity Runtime supported')](https://unity.com/releases/editor/archive) +[![r](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg 'Tests Passed')](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/actions/workflows/release.yml) + +[![Stars](https://img.shields.io/github/stars/IvanMurzak/Unity-Gyroscope-Parallax 'Stars')](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/stargazers) +[![License](https://img.shields.io/github/license/IvanMurzak/Unity-Gyroscope-Parallax?label=License)](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/blob/main/LICENSE) +[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) + +![Unity Parallax Effect](https://github.com/IvanMurza/Unity-Gyroscope-Parallax/raw/main/docs/img/unity-chan-parallax.gif) Unity Parallax based on gyroscope components. Supported fake gyroscope for simulation in Unity Editor. Alternative version to [Unity-Mouse-Parallax](https://github.com/IvanMurzak/Unity-Mouse-Parallax). -### Features -- ✔️ support legacy Input System -- ✔️ support new Input System -- ✔️ ability to simulate gyroscope in Unity Editor -- ✔️ move/rotate objects based on gyroscope -- ✔️ ability to add custom controllers +## Features + +- ✔️ Add customizable parallax effect based on sensor data +- ✔️ Control object movement & rotation based on gyroscope +- ✔️ Supports both *New* and *Legacy* `Input System` +- ✔️ Embedded gyroscope simulator right into Unity Editor + +### Stability status + +| Unity Version | Editor test | Player test | Build test | +|---------------|-------------|-------------|------------| +| 2019.4.40f1 | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-editmode) | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-playmode) | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-standalone) | +| 2020.3.48f1 | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-editmode) | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-playmode) | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-standalone) | +| 2021.3.45f1 | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-editmode) | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-playmode) | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-standalone) | +| 2022.3.62f1 | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-editmode) | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-playmode) | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-standalone) | +| 6000.0.58f1 | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-editmode) | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-playmode) | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-standalone) | + +--- + +## Installation + +### Option 1 - Installer + +- **[⬇️ Download Installer](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/1.4.1/Gyroscope-Parallax-Installer.unitypackage)** +- **📂 Import installer into Unity project** + > - You may use double click on the file - Unity will open it + > - OR: You may open Unity Editor first, then click on `Assets/Import Package/Custom Package`, then choose the file + +### Option 2 - OpenUPM-CLI -![unity-gyroscope-parallax-small](https://user-images.githubusercontent.com/9135028/177197269-a11dd87c-3f6b-400d-bf91-01a9b051cb1b.gif) +- [⬇️ Install OpenUPM-CLI](https://github.com/openupm/openupm-cli#installation) +- 📟 Open command line in Unity project folder + +```bash +openupm add extensions.unity.gyroscope.parallax +``` + +### Option 3 - Asset Store + +- **[▶️ Open Asset Store](https://u3d.as/3E42)** + +--- + +# Usage + +- Add needed `Gyro...` component to any GameObject +- Link Targets to list of targets +- Press 'Play' button in Unity Editor +- Find `Fake Gyroscope Manager` in `DonDestroyOnLoad` scene (appears in *Play Mode*) + ![image](https://user-images.githubusercontent.com/9135028/166464685-b6197e8a-547d-47ab-9039-824ce29f3ca5.png) +- Change XY values of `Gravity` and `Attitude` properties to simulate gyroscope in Unity Editor + +## GyroMover2D -# GyroMover2D Moves list of objects using gyroscope. ![image](https://user-images.githubusercontent.com/9135028/166463235-50702210-3b09-417d-9b9a-547fce73ba15.png) ![image](https://user-images.githubusercontent.com/9135028/166465109-33274de8-84e3-44e4-a8ab-b7c1f3ea2380.png) ![Unity_WTZrJSE6qY](https://user-images.githubusercontent.com/9135028/166468223-2992f1a9-8ead-454e-bc3a-5adaab832868.gif) +## GyroRotator2D -# GyroRotator2D Rotates list of objects using gyroscope. -![image](https://user-images.githubusercontent.com/9135028/176648393-cde4e34d-1c7c-4a58-9935-a5ff6081d2e7.png) - ![image](https://user-images.githubusercontent.com/9135028/166465157-5f1325f3-8109-4a35-bd91-87082aa36cf9.png) +![image](https://user-images.githubusercontent.com/9135028/176648393-cde4e34d-1c7c-4a58-9935-a5ff6081d2e7.png) ![image](https://user-images.githubusercontent.com/9135028/166465157-5f1325f3-8109-4a35-bd91-87082aa36cf9.png) ![Unity_CeUGRyFD5v](https://user-images.githubusercontent.com/9135028/166467361-485a1e2b-f799-4700-ada8-3982e06f2245.gif) - -# How to install - Option 1 (RECOMMENDED) -- [Install OpenUPM-CLI](https://github.com/openupm/openupm-cli#installation) -- Open command line in Unity project folder -- `openupm add extensions.unity.gyroscope.parallax` - -# How to install - Option 2 -- Add this code to /Packages/manifest.json -```json -{ - "dependencies": { - "extensions.unity.gyroscope.parallax": "1.4.1", - }, - "scopedRegistries": [ - { - "name": "package.openupm.com", - "url": "https://package.openupm.com", - "scopes": [ - "extensions.unity", - "com.cysharp", - "com.neuecc" - ] - } - ] -} -``` - -# How to use -- add needed `Gyro...2D` component to any GameObject -- link Targets to list of targets -- press 'Play' button in Unity Editor -- find `Fake Gyroscope Manager` in `DonDestroyOnLoad` scene (appears in Play Mode) -- ![image](https://user-images.githubusercontent.com/9135028/166464685-b6197e8a-547d-47ab-9039-824ce29f3ca5.png) -- change XY values of `Gravity` and `Attitude` properties to simulate gyroscope in Unity Editor diff --git a/Unity-Package/.claude/settings.local.json b/Unity-Package/.claude/settings.local.json new file mode 100644 index 0000000..2908062 --- /dev/null +++ b/Unity-Package/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "Bash(find:*)" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/Unity-Package/.gitignore b/Unity-Package/.gitignore new file mode 100644 index 0000000..bfa6490 --- /dev/null +++ b/Unity-Package/.gitignore @@ -0,0 +1,75 @@ +# 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 +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Mm]emoryCaptures/ + +# Asset meta data should only be ignored when the corresponding asset is also ignored +!/[Aa]ssets/**/*.meta + +# 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 +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +*/AndroidLogcatSettings.asset +/Assets/StreamingAssets + +# Crashlytics generated file +crashlytics-build.properties + +# ODIN Ignore the auto-generated AOT compatibility dll. +/Assets/Plugins/Sirenix/Assemblies/AOT/* +/Assets/Plugins/Sirenix/Assemblies/AOT** + +# ODIN Ignore all unpacked demos. +/Assets/Plugins/Sirenix/Demos/* + +# ODIN plugin +/Assets/Plugins/Sirenix** diff --git a/Unity-Package/.vscode/extensions.json b/Unity-Package/.vscode/extensions.json new file mode 100644 index 0000000..ddb6ff8 --- /dev/null +++ b/Unity-Package/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/Unity-Package/.vscode/launch.json b/Unity-Package/.vscode/launch.json new file mode 100644 index 0000000..da60e25 --- /dev/null +++ b/Unity-Package/.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/Unity-Package/.vscode/settings.json b/Unity-Package/.vscode/settings.json new file mode 100644 index 0000000..3c94f1e --- /dev/null +++ b/Unity-Package/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.gitmodules": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "ProjectSettings/": true, + "temp/": true, + "Temp/": true + }, + "dotnet.defaultSolution": "Unity-Package.sln", + "cSpell.words": [ + "Lerp", + "Mathf" + ] +} \ No newline at end of file diff --git a/.vsconfig b/Unity-Package/.vsconfig similarity index 100% rename from .vsconfig rename to Unity-Package/.vsconfig diff --git a/Assets/Demo.meta b/Unity-Package/Assets/Demo.meta similarity index 100% rename from Assets/Demo.meta rename to Unity-Package/Assets/Demo.meta diff --git a/Assets/Demo/DemoSetup.cs b/Unity-Package/Assets/Demo/DemoSetup.cs similarity index 100% rename from Assets/Demo/DemoSetup.cs rename to Unity-Package/Assets/Demo/DemoSetup.cs diff --git a/Assets/Demo/DemoSetup.cs.meta b/Unity-Package/Assets/Demo/DemoSetup.cs.meta similarity index 100% rename from Assets/Demo/DemoSetup.cs.meta rename to Unity-Package/Assets/Demo/DemoSetup.cs.meta diff --git a/Unity-Package/Assets/Demo/GyroscopeRotator.cs b/Unity-Package/Assets/Demo/GyroscopeRotator.cs new file mode 100644 index 0000000..c69512a --- /dev/null +++ b/Unity-Package/Assets/Demo/GyroscopeRotator.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityGyroscope.Manager; + +public class GyroscopeRotator : MonoBehaviour +{ + FakeGyroscopeManager fakeGyroscopeManager; + + void Update() + { + if (fakeGyroscopeManager == null) + fakeGyroscopeManager = FindObjectOfType(); + + if (fakeGyroscopeManager == null) + return; + + fakeGyroscopeManager.settings.gravity = new Vector3( + x: Mathf.Sin(Time.time) / 2f, + y: Mathf.Cos(Time.time) / 2f, + z: 1 + ); + fakeGyroscopeManager.settings.attitude = new Vector3( + x: Mathf.Sin(Time.time) / 2f, + y: Mathf.Cos(Time.time) / 2f, + z: 1 + ); + } +} diff --git a/Unity-Package/Assets/Demo/GyroscopeRotator.cs.meta b/Unity-Package/Assets/Demo/GyroscopeRotator.cs.meta new file mode 100644 index 0000000..f691e84 --- /dev/null +++ b/Unity-Package/Assets/Demo/GyroscopeRotator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a4f664e9f15ff904f92cefac9b25b952 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Scenes.meta b/Unity-Package/Assets/Demo/Scenes.meta similarity index 100% rename from Assets/Demo/Scenes.meta rename to Unity-Package/Assets/Demo/Scenes.meta diff --git a/Assets/Demo/Scenes/Demo.unity b/Unity-Package/Assets/Demo/Scenes/Demo.unity similarity index 99% rename from Assets/Demo/Scenes/Demo.unity rename to Unity-Package/Assets/Demo/Scenes/Demo.unity index 8de05c5..92657e2 100644 --- a/Assets/Demo/Scenes/Demo.unity +++ b/Unity-Package/Assets/Demo/Scenes/Demo.unity @@ -156,6 +156,8 @@ MonoBehaviour: offsetMultiplier: {x: 1, y: 1} targets: - target: {fileID: 1275941634} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 1.5, y: 20} axes: 4 @@ -911,21 +913,33 @@ MonoBehaviour: offsetMultiplier: {x: 1, y: 1} targets: - target: {fileID: 2022894514} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 2, y: 2} - target: {fileID: 393434817} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 1, y: 1} - target: {fileID: 1275941634} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 0.25, y: 0.25} - target: {fileID: 575556458} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 0.3, y: 0.3} - target: {fileID: 342336931} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 0.4, y: 0.4} - target: {fileID: 629033410} + inverseX: 1 + inverseY: 1 speed: 1 maxOffset: {x: 0.5, y: 0.5} --- !u!4 &1883056389 diff --git a/Assets/Demo/Scenes/Demo.unity.meta b/Unity-Package/Assets/Demo/Scenes/Demo.unity.meta similarity index 100% rename from Assets/Demo/Scenes/Demo.unity.meta rename to Unity-Package/Assets/Demo/Scenes/Demo.unity.meta diff --git a/Assets/Demo/Scenes/Sample.unity b/Unity-Package/Assets/Demo/Scenes/Sample.unity similarity index 100% rename from Assets/Demo/Scenes/Sample.unity rename to Unity-Package/Assets/Demo/Scenes/Sample.unity diff --git a/Assets/Demo/Scenes/Sample.unity.meta b/Unity-Package/Assets/Demo/Scenes/Sample.unity.meta similarity index 100% rename from Assets/Demo/Scenes/Sample.unity.meta rename to Unity-Package/Assets/Demo/Scenes/Sample.unity.meta diff --git a/Assets/Demo/Textures.meta b/Unity-Package/Assets/Demo/Textures.meta similarity index 100% rename from Assets/Demo/Textures.meta rename to Unity-Package/Assets/Demo/Textures.meta diff --git a/Assets/Demo/Textures/Unity-chan.png b/Unity-Package/Assets/Demo/Textures/Unity-chan.png similarity index 100% rename from Assets/Demo/Textures/Unity-chan.png rename to Unity-Package/Assets/Demo/Textures/Unity-chan.png diff --git a/Assets/Demo/Textures/Unity-chan.png.meta b/Unity-Package/Assets/Demo/Textures/Unity-chan.png.meta similarity index 100% rename from Assets/Demo/Textures/Unity-chan.png.meta rename to Unity-Package/Assets/Demo/Textures/Unity-chan.png.meta diff --git a/Assets/Demo/Textures/cloud1.png b/Unity-Package/Assets/Demo/Textures/cloud1.png similarity index 100% rename from Assets/Demo/Textures/cloud1.png rename to Unity-Package/Assets/Demo/Textures/cloud1.png diff --git a/Assets/Demo/Textures/cloud1.png.meta b/Unity-Package/Assets/Demo/Textures/cloud1.png.meta similarity index 100% rename from Assets/Demo/Textures/cloud1.png.meta rename to Unity-Package/Assets/Demo/Textures/cloud1.png.meta diff --git a/Assets/Demo/Textures/cloud2.png b/Unity-Package/Assets/Demo/Textures/cloud2.png similarity index 100% rename from Assets/Demo/Textures/cloud2.png rename to Unity-Package/Assets/Demo/Textures/cloud2.png diff --git a/Assets/Demo/Textures/cloud2.png.meta b/Unity-Package/Assets/Demo/Textures/cloud2.png.meta similarity index 100% rename from Assets/Demo/Textures/cloud2.png.meta rename to Unity-Package/Assets/Demo/Textures/cloud2.png.meta diff --git a/Assets/_PackageRoot.meta b/Unity-Package/Assets/root.meta similarity index 100% rename from Assets/_PackageRoot.meta rename to Unity-Package/Assets/root.meta diff --git a/Assets/_PackageRoot/Editor.meta b/Unity-Package/Assets/root/Editor.meta similarity index 100% rename from Assets/_PackageRoot/Editor.meta rename to Unity-Package/Assets/root/Editor.meta diff --git a/Assets/_PackageRoot/Editor/Gizmos.meta b/Unity-Package/Assets/root/Editor/Gizmos.meta similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos.meta rename to Unity-Package/Assets/root/Editor/Gizmos.meta diff --git a/Assets/_PackageRoot/Editor/Gizmos/.gitignore b/Unity-Package/Assets/root/Editor/Gizmos/.gitignore similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos/.gitignore rename to Unity-Package/Assets/root/Editor/Gizmos/.gitignore diff --git a/Assets/_PackageRoot/Editor/Gizmos/GyroMover.png b/Unity-Package/Assets/root/Editor/Gizmos/GyroMover.png similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos/GyroMover.png rename to Unity-Package/Assets/root/Editor/Gizmos/GyroMover.png diff --git a/Assets/_PackageRoot/Editor/Gizmos/GyroMover.png.meta b/Unity-Package/Assets/root/Editor/Gizmos/GyroMover.png.meta similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos/GyroMover.png.meta rename to Unity-Package/Assets/root/Editor/Gizmos/GyroMover.png.meta diff --git a/Assets/_PackageRoot/Editor/Gizmos/GyroRotator.png b/Unity-Package/Assets/root/Editor/Gizmos/GyroRotator.png similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos/GyroRotator.png rename to Unity-Package/Assets/root/Editor/Gizmos/GyroRotator.png diff --git a/Assets/_PackageRoot/Editor/Gizmos/GyroRotator.png.meta b/Unity-Package/Assets/root/Editor/Gizmos/GyroRotator.png.meta similarity index 100% rename from Assets/_PackageRoot/Editor/Gizmos/GyroRotator.png.meta rename to Unity-Package/Assets/root/Editor/Gizmos/GyroRotator.png.meta diff --git a/Unity-Package/Assets/root/LICENSE b/Unity-Package/Assets/root/LICENSE new file mode 100644 index 0000000..4e88c79 --- /dev/null +++ b/Unity-Package/Assets/root/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Ivan Murzak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Unity-Package/Assets/root/LICENSE.meta b/Unity-Package/Assets/root/LICENSE.meta new file mode 100644 index 0000000..aec384f --- /dev/null +++ b/Unity-Package/Assets/root/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5709d289f874474784708030ecb6aac +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/README.md b/Unity-Package/Assets/root/README.md new file mode 100644 index 0000000..8deca91 --- /dev/null +++ b/Unity-Package/Assets/root/README.md @@ -0,0 +1,83 @@ +# [Unity Gyroscope Parallax](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax) + +[![OpenUPM](https://img.shields.io/npm/v/extensions.unity.gyroscope.parallax?label=OpenUPM®istry_uri=https://package.openupm.com&labelColor=333A41 'OpenUPM package')](https://openupm.com/packages/extensions.unity.gyroscope.parallax/) +[![Unity Asset Store](https://img.shields.io/badge/Asset%20Store-View-blue?logo=unity&labelColor=333A41 'Asset Store')](https://u3d.as/3E42) +[![Unity Editor](https://img.shields.io/badge/Editor-X?style=flat&logo=unity&labelColor=333A41&color=49BC5C 'Unity Editor supported')](https://unity.com/releases/editor/archive) +[![Unity Runtime](https://img.shields.io/badge/Runtime-X?style=flat&logo=unity&labelColor=333A41&color=49BC5C 'Unity Runtime supported')](https://unity.com/releases/editor/archive) +[![r](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg 'Tests Passed')](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/actions/workflows/release.yml) + +[![Stars](https://img.shields.io/github/stars/IvanMurzak/Unity-Gyroscope-Parallax 'Stars')](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/stargazers) +[![License](https://img.shields.io/github/license/IvanMurzak/Unity-Gyroscope-Parallax?label=License)](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/blob/main/LICENSE) +[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) + +![Unity Parallax Effect](https://github.com/IvanMurza/Unity-Gyroscope-Parallax/raw/main/docs/img/unity-chan-parallax.gif) + +Unity Parallax based on gyroscope components. Supported fake gyroscope for simulation in Unity Editor. Alternative version to [Unity-Mouse-Parallax](https://github.com/IvanMurzak/Unity-Mouse-Parallax). + +## Features + +- ✔️ Add customizable parallax effect based on sensor data +- ✔️ Control object movement & rotation based on gyroscope +- ✔️ Supports both *New* and *Legacy* `Input System` +- ✔️ Embedded gyroscope simulator right into Unity Editor + +### Stability status + +| Unity Version | Editor test | Player test | Build test | +|---------------|-------------|-------------|------------| +| 2019.4.40f1 | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-editmode) | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-playmode) | ![2019.4.40f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2019-4-40f1-standalone) | +| 2020.3.48f1 | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-editmode) | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-playmode) | ![2020.3.48f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2020-3-48f1-standalone) | +| 2021.3.45f1 | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-editmode) | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-playmode) | ![2021.3.45f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2021-3-45f1-standalone) | +| 2022.3.62f1 | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-editmode) | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-playmode) | ![2022.3.62f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-2022-3-62f1-standalone) | +| 6000.0.58f1 | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-editmode) | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-playmode) | ![6000.0.58f1](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/workflows/release/badge.svg?job=test-unity-6000-0-58f1-standalone) | + +--- + +## Installation + +### Option 1 - Installer + +- **[⬇️ Download Installer](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/1.4.1/Gyroscope-Parallax-Installer.unitypackage)** +- **📂 Import installer into Unity project** + > - You may use double click on the file - Unity will open it + > - OR: You may open Unity Editor first, then click on `Assets/Import Package/Custom Package`, then choose the file + +### Option 2 - OpenUPM-CLI + +- [⬇️ Install OpenUPM-CLI](https://github.com/openupm/openupm-cli#installation) +- 📟 Open command line in Unity project folder + +```bash +openupm add extensions.unity.gyroscope.parallax +``` + +### Option 3 - Asset Store + +- **[▶️ Open Asset Store](https://u3d.as/3E42)** + +--- + +# Usage + +- Add needed `Gyro...` component to any GameObject +- Link Targets to list of targets +- Press 'Play' button in Unity Editor +- Find `Fake Gyroscope Manager` in `DonDestroyOnLoad` scene (appears in *Play Mode*) + ![image](https://user-images.githubusercontent.com/9135028/166464685-b6197e8a-547d-47ab-9039-824ce29f3ca5.png) +- Change XY values of `Gravity` and `Attitude` properties to simulate gyroscope in Unity Editor + +## GyroMover2D + +Moves list of objects using gyroscope. + +![image](https://user-images.githubusercontent.com/9135028/166463235-50702210-3b09-417d-9b9a-547fce73ba15.png) ![image](https://user-images.githubusercontent.com/9135028/166465109-33274de8-84e3-44e4-a8ab-b7c1f3ea2380.png) + +![Unity_WTZrJSE6qY](https://user-images.githubusercontent.com/9135028/166468223-2992f1a9-8ead-454e-bc3a-5adaab832868.gif) + +## GyroRotator2D + +Rotates list of objects using gyroscope. + +![image](https://user-images.githubusercontent.com/9135028/176648393-cde4e34d-1c7c-4a58-9935-a5ff6081d2e7.png) ![image](https://user-images.githubusercontent.com/9135028/166465157-5f1325f3-8109-4a35-bd91-87082aa36cf9.png) + +![Unity_CeUGRyFD5v](https://user-images.githubusercontent.com/9135028/166467361-485a1e2b-f799-4700-ada8-3982e06f2245.gif) diff --git a/Assets/_PackageRoot/README.md.meta b/Unity-Package/Assets/root/README.md.meta similarity index 100% rename from Assets/_PackageRoot/README.md.meta rename to Unity-Package/Assets/root/README.md.meta diff --git a/Assets/_PackageRoot/Scripts.meta b/Unity-Package/Assets/root/Scripts.meta similarity index 100% rename from Assets/_PackageRoot/Scripts.meta rename to Unity-Package/Assets/root/Scripts.meta diff --git a/Assets/_PackageRoot/Editor/Scripts/.gitignore b/Unity-Package/Assets/root/Scripts/.gitignore similarity index 100% rename from Assets/_PackageRoot/Editor/Scripts/.gitignore rename to Unity-Package/Assets/root/Scripts/.gitignore diff --git a/Assets/_PackageRoot/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef b/Unity-Package/Assets/root/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef similarity index 85% rename from Assets/_PackageRoot/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef rename to Unity-Package/Assets/root/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef index 7fb748d..fec7742 100644 --- a/Assets/_PackageRoot/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef +++ b/Unity-Package/Assets/root/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef @@ -2,8 +2,7 @@ "name": "Extensions.Unity.Gyroscope.Parallax", "rootNamespace": "", "references": [ - "Extensions.Unity.Gyroscope.Manager", - "UniTask" + "Extensions.Unity.Gyroscope.Manager" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/_PackageRoot/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef.meta b/Unity-Package/Assets/root/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef.meta rename to Unity-Package/Assets/root/Scripts/Extensions.Unity.Gyroscope.Parallax.asmdef.meta diff --git a/Assets/_PackageRoot/Scripts/Mover2D.meta b/Unity-Package/Assets/root/Scripts/Mover2D.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Mover2D.meta rename to Unity-Package/Assets/root/Scripts/Mover2D.meta diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2D.cs b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2D.cs similarity index 63% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2D.cs rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2D.cs index 4de1a25..d84a724 100644 --- a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2D.cs +++ b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2D.cs @@ -1,25 +1,25 @@ -using Cysharp.Threading.Tasks; using System; using System.Collections.Generic; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; + #if ODIN_INSPECTOR using Sirenix.OdinInspector; #endif namespace UnityGyroscope.Parallax -{ +{ public abstract class GyroMover2D : MonoBehaviour { - public float speedMultiplier = 1; - public Vector2 offsetMultiplier = Vector2.one; + public float speedMultiplier = 1; + public Vector2 offsetMultiplier = Vector2.one; + #if ODIN_INSPECTOR [Required] #endif - [SerializeField] List targets = new List(); - + [SerializeField] List targets = new List(); - protected virtual async UniTask OnEnable() + protected virtual void OnEnable() { if (!Gyroscope.Instance.HasGyroscope) return; @@ -42,7 +42,7 @@ protected virtual void OnDisable() protected abstract void Subscribe(); protected abstract void Unsubscribe(); - protected abstract void OnUpdatePrepeare(); + protected abstract void OnUpdatePrepare(); protected abstract void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier); protected virtual void Update() @@ -50,7 +50,7 @@ protected virtual void Update() if (!Gyroscope.Instance.HasGyroscope) return; - OnUpdatePrepeare(); + OnUpdatePrepare(); foreach (var target in targets) { @@ -61,14 +61,14 @@ protected virtual void Update() [Serializable] public class GyroTarget - { - public Transform target; - public bool inverseX = true; - public bool inverseY = true; - public float speed = 1; - public Vector2 maxOffset = new Vector2(100, 100); + { + public Transform target; + public bool inverseX = true; + public bool inverseY = true; + public float speed = 1; + public Vector2 maxOffset = new Vector2(100, 100); - public Vector3 OriginalLocalPosition { get; set; } - } + public Vector3 OriginalLocalPosition { get; set; } + } } } \ No newline at end of file diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2D.cs.meta b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2D.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2D.cs.meta rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2D.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DAttitude.cs b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DAttitude.cs similarity index 70% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DAttitude.cs rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DAttitude.cs index 8f07c28..7fd6848 100644 --- a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DAttitude.cs +++ b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DAttitude.cs @@ -1,4 +1,4 @@ -using Cysharp.Threading.Tasks; +using System.Collections; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; @@ -12,18 +12,22 @@ public class GyroMover2DAttitude : GyroMover2D Vector3 Correct(Quaternion attitude) { var euler = attitude.eulerAngles; - euler.x = (euler.x + 180f) % 360 - 180; - euler.y = (euler.y + 180f) % 360 - 180; + euler.x = (euler.x + 180f) % 360 - 180; + euler.y = (euler.y + 180f) % 360 - 180; return -euler; } - - protected override async UniTask OnEnable() + protected override void OnEnable() { - await base.OnEnable(); + base.OnEnable(); + + StartCoroutine(InitializeAfterFrame()); + } - await UniTask.DelayFrame(1); + IEnumerator InitializeAfterFrame() + { + yield return null; originGyroEulerAngles = Correct(Gyroscope.Instance.Attitude.Value); } protected override void OnDisable() @@ -45,15 +49,17 @@ protected override void Unsubscribe() Gyroscope.Instance.UnsubscribeAttitude(); } - private float RoundInRange(float min, float max, float value) => Mathf.Max(min, Mathf.Min(max, value)); - private float SmoothPower(float min, float max, float value) => 1f - (Mathf.Min(Mathf.Abs(value - min), Mathf.Abs(value - max)) / ((max - min) / 2f)); + private float RoundInRange(float min, float max, float value) + => Mathf.Max(min, Mathf.Min(max, value)); + private float SmoothPower(float min, float max, float value) + => 1f - (Mathf.Min(Mathf.Abs(value - min), Mathf.Abs(value - max)) / ((max - min) / 2f)); - protected override void OnUpdatePrepeare() - { + protected override void OnUpdatePrepare() + { gyroEuler = Correct(Gyroscope.Instance.Attitude.Value) - originGyroEulerAngles; } - protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier) - { + protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier) + { var maxOffsetX = Mathf.Abs(target.maxOffset.x); var maxOffsetY = Mathf.Abs(target.maxOffset.y); @@ -62,19 +68,19 @@ protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultipli target.target.localPosition, new Vector3 ( - target.OriginalLocalPosition.x + RoundInRange + x: target.OriginalLocalPosition.x + RoundInRange ( -maxOffsetX * offsetMultiplier.x, maxOffsetX * offsetMultiplier.x, target.inverseX ? -gyroEuler.x : gyroEuler.x ), - target.OriginalLocalPosition.y + RoundInRange + y: target.OriginalLocalPosition.y + RoundInRange ( -maxOffsetY * offsetMultiplier.y, maxOffsetY * offsetMultiplier.y, target.inverseY ? -gyroEuler.y : gyroEuler.y ), - target.OriginalLocalPosition.z + z: target.OriginalLocalPosition.z ), Time.deltaTime * target.speed * speedMultiplier ); diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DAttitude.cs.meta b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DAttitude.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DAttitude.cs.meta rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DAttitude.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DGravity.cs b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DGravity.cs similarity index 77% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DGravity.cs rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DGravity.cs index 37952c3..022c171 100644 --- a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DGravity.cs +++ b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DGravity.cs @@ -1,11 +1,10 @@ -using Cysharp.Threading.Tasks; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; namespace UnityGyroscope.Parallax { public class GyroMover2DGravity : GyroMover2D - { + { Vector3 gravity; Vector3 originGravity; @@ -14,9 +13,9 @@ Vector3 Correct(Vector3 gravity) return gravity; } - protected override async UniTask OnEnable() + protected override void OnEnable() { - await base.OnEnable(); + base.OnEnable(); } protected override void OnDisable() { @@ -35,30 +34,30 @@ protected override void Unsubscribe() Gyroscope.Instance.UnsubscribeGravity(); } - protected override void OnUpdatePrepeare() - { + protected override void OnUpdatePrepare() + { gravity = (Correct(Gyroscope.Instance.Gravity.Value) - originGravity).normalized; } - protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier) - { + protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier) + { target.target.localPosition = Vector3.Lerp ( target.target.localPosition, new Vector3 ( - target.OriginalLocalPosition.x + Mathf.Lerp + x: target.OriginalLocalPosition.x + Mathf.Lerp ( -target.maxOffset.x * offsetMultiplier.x, target.maxOffset.x * offsetMultiplier.x, (target.inverseX ? -gravity.x : gravity.x) + 0.5f ), - target.OriginalLocalPosition.y + Mathf.Lerp + y: target.OriginalLocalPosition.y + Mathf.Lerp ( -target.maxOffset.y * offsetMultiplier.y, target.maxOffset.y * offsetMultiplier.y, (target.inverseY ? -gravity.y : gravity.y) + 0.5f ), - target.OriginalLocalPosition.z + z: target.OriginalLocalPosition.z ), Time.deltaTime * target.speed * speedMultiplier ); diff --git a/Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DGravity.cs.meta b/Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DGravity.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Mover2D/GyroMover2DGravity.cs.meta rename to Unity-Package/Assets/root/Scripts/Mover2D/GyroMover2DGravity.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Rotator2D.meta b/Unity-Package/Assets/root/Scripts/Rotator2D.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Rotator2D.meta rename to Unity-Package/Assets/root/Scripts/Rotator2D.meta diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2D.cs b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2D.cs similarity index 74% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2D.cs rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2D.cs index e5526a0..b445931 100644 --- a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2D.cs +++ b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2D.cs @@ -1,25 +1,26 @@ -using Cysharp.Threading.Tasks; using System; using System.Collections.Generic; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; + #if ODIN_INSPECTOR using Sirenix.OdinInspector; #endif namespace UnityGyroscope.Parallax -{ +{ public abstract class GyroRotator2D : MonoBehaviour { - public float speedMultiplier = 1; - public Vector2 offsetMultiplier = Vector2.one; + public float speedMultiplier = 1; + public Vector2 offsetMultiplier = Vector2.one; + #if ODIN_INSPECTOR [Required] #endif - [SerializeField] List targets = new List(); + [SerializeField] List targets = new List(); - protected virtual async UniTask OnEnable() + protected virtual void OnEnable() { if (!Gyroscope.Instance.HasGyroscope) return; @@ -42,7 +43,7 @@ protected virtual void OnDisable() protected abstract void Subscribe(); protected abstract void Unsubscribe(); - protected abstract void OnUpdatePrepeare(); + protected abstract void OnUpdatePrepare(); protected abstract void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier, float toX, float toY, float toZ); protected abstract float CalcToX(GyroTarget target, Vector2 offsetMultiplier); protected abstract float CalcToY(GyroTarget target, Vector2 offsetMultiplier); @@ -53,7 +54,7 @@ protected virtual void Update() if (!Gyroscope.Instance.HasGyroscope) return; - OnUpdatePrepeare(); + OnUpdatePrepare(); foreach (var target in targets) { @@ -75,15 +76,15 @@ protected virtual void Update() [Serializable] public class GyroTarget - { - public Transform target; - public bool inverseX = true; - public bool inverseY = true; - public float speed = 1; - public Vector2 maxOffset = new Vector2(100, 100); - public Axes axes = Axes.XY; - - public Quaternion OriginalLocalRotation { get; set; } - } + { + public Transform target; + public bool inverseX = true; + public bool inverseY = true; + public float speed = 1; + public Vector2 maxOffset = new Vector2(100, 100); + public Axes axes = Axes.XY; + + public Quaternion OriginalLocalRotation { get; set; } + } } } \ No newline at end of file diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2D.cs.meta b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2D.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2D.cs.meta rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2D.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DAttitude.cs b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DAttitude.cs similarity index 61% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DAttitude.cs rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DAttitude.cs index a77cfa2..e4e8ac3 100644 --- a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DAttitude.cs +++ b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DAttitude.cs @@ -1,4 +1,4 @@ -using Cysharp.Threading.Tasks; +using System.Collections; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; @@ -12,17 +12,22 @@ public class GyroRotator2DAttitude : GyroRotator2D Vector3 Correct(Quaternion attitude) { var euler = attitude.eulerAngles; - euler.x = (euler.x + 180f) % 360 - 180; - euler.y = (euler.y + 180f) % 360 - 180; + euler.x = (euler.x + 180f) % 360 - 180; + euler.y = (euler.y + 180f) % 360 - 180; return -euler; } - protected override async UniTask OnEnable() + protected override void OnEnable() { - await base.OnEnable(); + base.OnEnable(); - await UniTask.DelayFrame(1); + StartCoroutine(InitializeAfterFrame()); + } + + IEnumerator InitializeAfterFrame() + { + yield return null; originGyroEulerAngles = Correct(Gyroscope.Instance.Attitude.Value); } protected override void OnDisable() @@ -44,20 +49,22 @@ protected override void Unsubscribe() Gyroscope.Instance.UnsubscribeAttitude(); } - private float RoundInRange(float min, float max, float value) => Mathf.Max(min, Mathf.Min(max, value)); - private float SmoothPower(float min, float max, float value) => 1f - (Mathf.Min(Mathf.Abs(value - min), Mathf.Abs(value - max)) / ((max - min) / 2f)); + private float RoundInRange(float min, float max, float value) + => Mathf.Max(min, Mathf.Min(max, value)); + private float SmoothPower(float min, float max, float value) + => 1f - (Mathf.Min(Mathf.Abs(value - min), Mathf.Abs(value - max)) / ((max - min) / 2f)); - protected override void OnUpdatePrepeare() - { + protected override void OnUpdatePrepare() + { gyroEuler = Correct(Gyroscope.Instance.Attitude.Value) - originGyroEulerAngles; } - protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier, float toX, float toY, float toZ) - { + protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier, float toX, float toY, float toZ) + { target.target.localRotation = Quaternion.Lerp ( - target.target.localRotation, - Quaternion.Euler(toX, toY, toZ), - Time.deltaTime * target.speed * speedMultiplier + a: target.target.localRotation, + b: Quaternion.Euler(toX, toY, toZ), + t: Time.deltaTime * target.speed * speedMultiplier ); } @@ -66,9 +73,9 @@ protected override float CalcToX(GyroTarget target, Vector2 offsetMultiplier) var maxOffsetX = Mathf.Abs(target.maxOffset.x); return target.OriginalLocalRotation.x + RoundInRange ( - -maxOffsetX * offsetMultiplier.x, - maxOffsetX * offsetMultiplier.x, - target.inverseX ? -gyroEuler.x : gyroEuler.x + min: -maxOffsetX * offsetMultiplier.x, + max: maxOffsetX * offsetMultiplier.x, + value: target.inverseX ? -gyroEuler.x : gyroEuler.x ); } @@ -77,9 +84,9 @@ protected override float CalcToY(GyroTarget target, Vector2 offsetMultiplier) var maxOffsetY = Mathf.Abs(target.maxOffset.y); return target.OriginalLocalRotation.y + RoundInRange ( - -maxOffsetY * offsetMultiplier.y, - maxOffsetY * offsetMultiplier.y, - target.inverseY ? -gyroEuler.y : gyroEuler.y + min: -maxOffsetY * offsetMultiplier.y, + max: maxOffsetY * offsetMultiplier.y, + value: target.inverseY ? -gyroEuler.y : gyroEuler.y ); } diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DAttitude.cs.meta b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DAttitude.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DAttitude.cs.meta rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DAttitude.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DGravity.cs b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DGravity.cs similarity index 69% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DGravity.cs rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DGravity.cs index 828b790..6df567d 100644 --- a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DGravity.cs +++ b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DGravity.cs @@ -1,11 +1,10 @@ -using Cysharp.Threading.Tasks; using UnityEngine; using Gyroscope = UnityGyroscope.Manager.Gyroscope; namespace UnityGyroscope.Parallax { public class GyroRotator2DGravity : GyroRotator2D - { + { Vector3 gravity; Vector3 originGravity; @@ -14,9 +13,9 @@ Vector3 Correct(Vector3 gravity) return gravity; } - protected override async UniTask OnEnable() + protected override void OnEnable() { - await base.OnEnable(); + base.OnEnable(); } protected override void OnDisable() { @@ -35,17 +34,17 @@ protected override void Unsubscribe() Gyroscope.Instance.UnsubscribeGravity(); } - protected override void OnUpdatePrepeare() - { + protected override void OnUpdatePrepare() + { gravity = (Correct(Gyroscope.Instance.Gravity.Value) - originGravity).normalized; } protected override void ApplyTransform(GyroTarget target, Vector2 offsetMultiplier, float toX, float toY, float toZ) { target.target.localRotation = Quaternion.Lerp ( - target.target.localRotation, - Quaternion.Euler(toX, toY, toZ), - Time.deltaTime * target.speed * speedMultiplier + a: target.target.localRotation, + b: Quaternion.Euler(toX, toY, toZ), + t: Time.deltaTime * target.speed * speedMultiplier ); } @@ -53,9 +52,9 @@ protected override float CalcToX(GyroTarget target, Vector2 offsetMultiplier) { return target.OriginalLocalRotation.x + Mathf.Lerp ( - -target.maxOffset.x * offsetMultiplier.x, - target.maxOffset.x * offsetMultiplier.x, - (target.inverseX ? -gravity.x : gravity.x) + 0.5f + a: -target.maxOffset.x * offsetMultiplier.x, + b: target.maxOffset.x * offsetMultiplier.x, + t: (target.inverseX ? -gravity.x : gravity.x) + 0.5f ); } @@ -63,9 +62,9 @@ protected override float CalcToY(GyroTarget target, Vector2 offsetMultiplier) { return target.OriginalLocalRotation.y + Mathf.Lerp ( - -target.maxOffset.y * offsetMultiplier.y, - target.maxOffset.y * offsetMultiplier.y, - (target.inverseY ? -gravity.y : gravity.y) + 0.5f + a: -target.maxOffset.y * offsetMultiplier.y, + b: target.maxOffset.y * offsetMultiplier.y, + t: (target.inverseY ? -gravity.y : gravity.y) + 0.5f ); } diff --git a/Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DGravity.cs.meta b/Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DGravity.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Rotator2D/GyroRotator2DGravity.cs.meta rename to Unity-Package/Assets/root/Scripts/Rotator2D/GyroRotator2DGravity.cs.meta diff --git a/Assets/_PackageRoot/Scripts/Utils.meta b/Unity-Package/Assets/root/Scripts/Utils.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Utils.meta rename to Unity-Package/Assets/root/Scripts/Utils.meta diff --git a/Assets/_PackageRoot/Scripts/Utils/Axes.cs b/Unity-Package/Assets/root/Scripts/Utils/Axes.cs similarity index 100% rename from Assets/_PackageRoot/Scripts/Utils/Axes.cs rename to Unity-Package/Assets/root/Scripts/Utils/Axes.cs diff --git a/Assets/_PackageRoot/Scripts/Utils/Axes.cs.meta b/Unity-Package/Assets/root/Scripts/Utils/Axes.cs.meta similarity index 100% rename from Assets/_PackageRoot/Scripts/Utils/Axes.cs.meta rename to Unity-Package/Assets/root/Scripts/Utils/Axes.cs.meta diff --git a/Unity-Package/Assets/root/Tests.meta b/Unity-Package/Assets/root/Tests.meta new file mode 100644 index 0000000..2ade2e0 --- /dev/null +++ b/Unity-Package/Assets/root/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eaf8b0565f3c0a74985ba6a95f06e4f9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Editor.meta b/Unity-Package/Assets/root/Tests/Editor.meta new file mode 100644 index 0000000..3416b04 --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dabf82e4c4cc90645823b2ef2e1b4ea9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs b/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs new file mode 100644 index 0000000..46ae0e2 --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs @@ -0,0 +1,34 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; + +namespace Extensions.Unity.Gyroscope.Parallax.Tests +{ + public class Test + { + [SetUp] + public void SetUp() + { + + } + + [TearDown] + public void TearDown() + { + + } + + [Test] + public void AlwaysSuccessfulTest() + { + Assert.IsTrue(true); + } + + [UnityTest] + public IEnumerator AlwaysSuccessfulCoroutineTest() + { + yield return null; + Assert.IsTrue(true); + } + } +} \ No newline at end of file diff --git a/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs.meta b/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs.meta new file mode 100644 index 0000000..b07e10f --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Editor/AlwaysSuccessTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7dfc58e7a5868524ba3f3c3c01e2895e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef new file mode 100644 index 0000000..a69b018 --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef @@ -0,0 +1,23 @@ +{ + "name": "Extensions.Unity.Gyroscope.Parallax.Tests.Editor", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner", + "UnityEditor.TestRunner" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef.meta b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef.meta new file mode 100644 index 0000000..160176a --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.Gyroscope.Parallax.Tests.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f0e02124964c424aa1701e9620f95c9 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Runtime.meta b/Unity-Package/Assets/root/Tests/Runtime.meta new file mode 100644 index 0000000..10a2b5f --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75de2acb431d244428c722b5a37cb4e2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs b/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs new file mode 100644 index 0000000..46ae0e2 --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs @@ -0,0 +1,34 @@ +using System.Collections; +using NUnit.Framework; +using UnityEngine.TestTools; + +namespace Extensions.Unity.Gyroscope.Parallax.Tests +{ + public class Test + { + [SetUp] + public void SetUp() + { + + } + + [TearDown] + public void TearDown() + { + + } + + [Test] + public void AlwaysSuccessfulTest() + { + Assert.IsTrue(true); + } + + [UnityTest] + public IEnumerator AlwaysSuccessfulCoroutineTest() + { + yield return null; + Assert.IsTrue(true); + } + } +} \ No newline at end of file diff --git a/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs.meta b/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs.meta new file mode 100644 index 0000000..b5a1334 --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Runtime/AlwaysSuccessTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2df88cbc6bf21c4458d330b369fe7416 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef new file mode 100644 index 0000000..315966e --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Extensions.Unity.Gyroscope.Parallax.Tests.Runtime", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef.meta b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef.meta new file mode 100644 index 0000000..985c3bb --- /dev/null +++ b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.Gyroscope.Parallax.Tests.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: acc447d75d5fb284481fb67057e2c38e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity-Package/Assets/root/package.json b/Unity-Package/Assets/root/package.json new file mode 100644 index 0000000..10e92c2 --- /dev/null +++ b/Unity-Package/Assets/root/package.json @@ -0,0 +1,40 @@ +{ + "name": "extensions.unity.gyroscope.parallax", + "displayName": "Unity Gyroscope Parallax", + "author": { + "name": "Ivan Murzak", + "email": "ivan.d.murzak@gmail.com", + "url": "https://github.com/IvanMurzak" + }, + "version": "1.4.1", + "unity": "2019.2", + "description": "A Unity plugin that enables parallax effects based on device gyroscope data. It allows you to create dynamic and immersive experiences by moving UI elements or game objects in response to device orientation changes. Perfect for adding depth and interactivity to your 2D and 3D projects.", + "keywords": [ + "parallax", + "animation", + "movement", + "gyroscope", + "motion", + "sensor", + "device orientation", + "rotation", + "2D", + "3D" + ], + "homepage": "https://github.com/IvanMurzak/Unity-Gyroscope-Parallax", + "bugs": { + "url": "https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/issues" + }, + "dependencies": { + "extensions.unity.gyroscope.manager": "1.2.6" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "extensions.unity.gyroscope.manager" + ] + } + ] +} \ No newline at end of file diff --git a/Assets/_PackageRoot/package.json.meta b/Unity-Package/Assets/root/package.json.meta similarity index 100% rename from Assets/_PackageRoot/package.json.meta rename to Unity-Package/Assets/root/package.json.meta diff --git a/Commands/NPM--AddUser.bat b/Unity-Package/Commands/NPM--AddUser.bat similarity index 100% rename from Commands/NPM--AddUser.bat rename to Unity-Package/Commands/NPM--AddUser.bat diff --git a/Commands/NPM--CopyREADME.bat b/Unity-Package/Commands/NPM--CopyREADME.bat similarity index 100% rename from Commands/NPM--CopyREADME.bat rename to Unity-Package/Commands/NPM--CopyREADME.bat diff --git a/Commands/NPM--UpdateDependencies.bat b/Unity-Package/Commands/NPM--UpdateDependencies.bat similarity index 100% rename from Commands/NPM--UpdateDependencies.bat rename to Unity-Package/Commands/NPM--UpdateDependencies.bat diff --git a/Commands/NPM--VersionMajor.bat b/Unity-Package/Commands/NPM--VersionMajor.bat similarity index 100% rename from Commands/NPM--VersionMajor.bat rename to Unity-Package/Commands/NPM--VersionMajor.bat diff --git a/Commands/NPM--VersionMinor.bat b/Unity-Package/Commands/NPM--VersionMinor.bat similarity index 100% rename from Commands/NPM--VersionMinor.bat rename to Unity-Package/Commands/NPM--VersionMinor.bat diff --git a/Commands/NPM--VersionPatch.bat b/Unity-Package/Commands/NPM--VersionPatch.bat similarity index 100% rename from Commands/NPM--VersionPatch.bat rename to Unity-Package/Commands/NPM--VersionPatch.bat diff --git a/Commands/[!!!]--GitHub--Release.bat b/Unity-Package/Commands/[!!!]--GitHub--Release.bat similarity index 100% rename from Commands/[!!!]--GitHub--Release.bat rename to Unity-Package/Commands/[!!!]--GitHub--Release.bat diff --git a/Commands/[!!!]--NPM--Publish.bat b/Unity-Package/Commands/[!!!]--NPM--Publish.bat similarity index 100% rename from Commands/[!!!]--NPM--Publish.bat rename to Unity-Package/Commands/[!!!]--NPM--Publish.bat diff --git a/Commands/[!]--GitHub--DraftRelease.bat b/Unity-Package/Commands/[!]--GitHub--DraftRelease.bat similarity index 100% rename from Commands/[!]--GitHub--DraftRelease.bat rename to Unity-Package/Commands/[!]--GitHub--DraftRelease.bat diff --git a/Unity-Package/Packages/manifest.json b/Unity-Package/Packages/manifest.json new file mode 100644 index 0000000..90a8dd5 --- /dev/null +++ b/Unity-Package/Packages/manifest.json @@ -0,0 +1,15 @@ +{ + "dependencies": { + "com.unity.test-framework": "1.1.33", + "extensions.unity.gyroscope.manager": "1.2.6" + }, + "scopedRegistries": [ + { + "name": "package.openupm.com", + "url": "https://package.openupm.com", + "scopes": [ + "extensions.unity.gyroscope.manager" + ] + } + ] +} diff --git a/Unity-Package/Packages/packages-lock.json b/Unity-Package/Packages/packages-lock.json new file mode 100644 index 0000000..ff9f974 --- /dev/null +++ b/Unity-Package/Packages/packages-lock.json @@ -0,0 +1,41 @@ +{ + "dependencies": { + "com.unity.ext.nunit": { + "version": "1.0.6", + "depth": 1, + "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" + }, + "extensions.unity.gyroscope.manager": { + "version": "1.2.6", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://package.openupm.com" + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + } + } +} diff --git a/Unity-Package/ProjectSettings/AudioManager.asset b/Unity-Package/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..df1e809 --- /dev/null +++ b/Unity-Package/ProjectSettings/AudioManager.asset @@ -0,0 +1,20 @@ +%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_EnableOutputSuspension: 1 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 + m_RequestedDSPBufferSize: 0 diff --git a/Unity-Package/ProjectSettings/ClusterInputManager.asset b/Unity-Package/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/DynamicsManager.asset b/Unity-Package/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..c145171 --- /dev/null +++ b/Unity-Package/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: 0 + 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/Unity-Package/ProjectSettings/EditorBuildSettings.asset similarity index 100% rename from ProjectSettings/EditorBuildSettings.asset rename to Unity-Package/ProjectSettings/EditorBuildSettings.asset diff --git a/Unity-Package/ProjectSettings/EditorSettings.asset b/Unity-Package/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..7c96014 --- /dev/null +++ b/Unity-Package/ProjectSettings/EditorSettings.asset @@ -0,0 +1,41 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 2 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + 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: 2 + m_GameObjectNamingScheme: 1 + m_AssetNamingUsesSpace: 0 + m_UseLegacyProbeSampleCount: 0 + m_SerializeInlineMappingsOnOneLine: 1 + m_DisableCookiesInLightmapper: 0 + m_AssetPipelineMode: 1 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 + m_CacheServerValidationMode: 2 diff --git a/Unity-Package/ProjectSettings/GraphicsSettings.asset b/Unity-Package/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..c165afb --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/InputManager.asset b/Unity-Package/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..17c8f53 --- /dev/null +++ b/Unity-Package/ProjectSettings/InputManager.asset @@ -0,0 +1,295 @@ +%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 diff --git a/Unity-Package/ProjectSettings/NavMeshAreas.asset b/Unity-Package/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..ad2654e --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/PackageManagerSettings.asset b/Unity-Package/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000..270cb9c --- /dev/null +++ b/Unity-Package/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,45 @@ +%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_ScopedRegistriesSettingsExpanded: 1 + oneTimeWarningShown: 0 + m_Registries: + - m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + - m_Id: scoped:package.openupm.com + m_Name: package.openupm.com + m_Url: https://package.openupm.com + m_Scopes: + - extensions.unity.gyroscope.manager + m_IsDefault: 0 + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_ErrorMessage: + m_Original: + m_Id: scoped:package.openupm.com + m_Name: package.openupm.com + m_Url: https://package.openupm.com + m_Scopes: + - extensions.unity.gyroscope.manager + m_IsDefault: 0 + m_Modified: 0 + m_Name: package.openupm.com + m_Url: https://package.openupm.com + m_Scopes: + - extensions.unity.gyroscope.manager + m_SelectedScopeIndex: 0 diff --git a/Unity-Package/ProjectSettings/Physics2DSettings.asset b/Unity-Package/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..34e8328 --- /dev/null +++ b/Unity-Package/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: 0 + 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/Unity-Package/ProjectSettings/PresetManager.asset b/Unity-Package/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/ProjectSettings.asset similarity index 91% rename from ProjectSettings/ProjectSettings.asset rename to Unity-Package/ProjectSettings/ProjectSettings.asset index f192007..b736d65 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/Unity-Package/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 22 + serializedVersion: 20 productGUID: e52dd50c2c542e2469809b6724127462 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -49,8 +49,6 @@ PlayerSettings: m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 m_MTRendering: 1 - mipStripping: 0 - numberOfMipsStripped: 0 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 @@ -125,9 +123,7 @@ PlayerSettings: stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 vulkanEnableSetSRGBWrite: 0 - vulkanEnablePreTransform: 0 vulkanEnableLateAcquireNextImage: 0 - vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: 4:3: 1 5:4: 1 @@ -142,6 +138,31 @@ PlayerSettings: xboxOneDisableKinectGpuReservation: 1 xboxOneEnable7thCore: 1 vrSettings: + cardboard: + depthFormat: 0 + enableTransitionView: 0 + daydream: + depthFormat: 0 + useSustainedPerformanceMode: 0 + enableVideoLayer: 0 + useProtectedVideoMemory: 0 + minimumSupportedHeadTracking: 0 + maximumSupportedHeadTracking: 1 + hololens: + depthFormat: 1 + depthBufferSharingEnabled: 1 + lumin: + depthFormat: 0 + frameTiming: 2 + enableGLCache: 0 + glCacheMaxBlobSize: 524288 + glCacheMaxFileSize: 8388608 + oculus: + sharedDepthBuffer: 1 + dashSupport: 1 + lowOverheadMode: 0 + protectedContext: 0 + v2Signing: 1 enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 @@ -150,7 +171,6 @@ PlayerSettings: m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 - resetResolutionOnWindowResize: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: @@ -159,7 +179,6 @@ PlayerSettings: Standalone: 0 iPhone: 0 tvOS: 0 - overrideDefaultApplicationIdentifier: 0 AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 21 AndroidTargetSdkVersion: 33 @@ -213,8 +232,8 @@ PlayerSettings: iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: + iOSUseLaunchScreenStoryboard: 0 iOSLaunchScreenCustomStoryboardPath: - iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 @@ -232,17 +251,9 @@ PlayerSettings: iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 appleEnableProMotion: 0 - shaderPrecisionModel: 0 clonedFromGUID: 00000000000000000000000000000000 templatePackageId: templateDefaultScene: - useCustomMainManifest: 0 - useCustomLauncherManifest: 0 - useCustomMainGradleTemplate: 0 - useCustomLauncherGradleManifest: 0 - useCustomBaseGradleTemplate: 0 - useCustomGradlePropertiesTemplate: 0 - useCustomProguardFile: 0 AndroidTargetArchitectures: 3 AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 @@ -262,9 +273,6 @@ PlayerSettings: banner: {fileID: 0} androidGamepadSupportLevel: 0 chromeosInputEmulation: 1 - AndroidMinifyWithR8: 0 - AndroidMinifyRelease: 0 - AndroidMinifyDebug: 0 AndroidValidateAppBundleSize: 1 AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: @@ -383,7 +391,6 @@ PlayerSettings: tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] - m_BuildTargetNormalMapEncoding: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -393,15 +400,12 @@ PlayerSettings: cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: - bluetoothUsageDescription: - switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 - switchUseGOLDLinker: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -530,7 +534,6 @@ PlayerSettings: switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 - switchUseNewStyleFilepaths: 0 switchUseMicroSleepForYield: 1 switchEnableRamDiskSupport: 0 switchMicroSleepForYieldTime: 25 @@ -610,6 +613,32 @@ PlayerSettings: ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] ps4attribVROutputEnabled: 0 + ps5ParamFilePath: + ps5VideoOutPixelFormat: 0 + ps5VideoOutInitialWidth: 1920 + ps5VideoOutOutputMode: 1 + ps5BackgroundImagePath: + ps5StartupImagePath: + ps5Pic2Path: + ps5StartupImagesFolder: + ps5IconImagesFolder: + ps5SaveDataImagePath: + ps5SdkOverride: + ps5BGMPath: + ps5ShareOverlayImagePath: + ps5NPConfigZipPath: + ps5Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps5UseResolutionFallback: 0 + ps5UseAudio3dBackend: 0 + ps5ScriptOptimizationLevel: 2 + ps5Audio3dVirtualSpeakerCount: 14 + ps5VrrSupport: 0 + ps5UpdateReferencePackage: + ps5disableAutoHideSplash: 0 + ps5OperatingSystemCanDisableSplashScreen: 0 + ps5IncludedModules: [] + ps5SharedBinaryContentLabels: [] + ps5SharedBinarySystemFolders: [] monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} @@ -626,13 +655,11 @@ PlayerSettings: webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 webGLCompressionFormat: 0 - webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 - webGLDecompressionFallback: 0 + webGLWasmStreaming: 0 scriptingDefineSymbols: 7: ODIN_INSPECTOR;ODIN_INSPECTOR_3 - additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: Android: 0 @@ -641,9 +668,6 @@ PlayerSettings: incrementalIl2cppBuild: {} suppressCommonWarnings: 1 allowUnsafeCode: 0 - useDeterministicCompilation: 1 - useReferenceAssemblies: 1 - enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1 @@ -671,14 +695,14 @@ PlayerSettings: 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} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, + a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} metroTargetDeviceFamilies: {} metroFTAName: metroFTAFileTypes: [] metroProtocolName: - vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -706,7 +730,10 @@ PlayerSettings: XboxOneXTitleMemory: 8 XboxOneOverrideIdentityName: XboxOneOverrideIdentityPublisher: - vrEditorSettings: {} + vrEditorSettings: + daydream: + daydreamIconForeground: {fileID: 0} + daydreamIconBackground: {fileID: 0} cloudServicesEnabled: {} luminIcon: m_Name: @@ -720,12 +747,11 @@ PlayerSettings: m_VersionCode: 1 m_VersionName: apiCompatibilityLevel: 6 - activeInputHandler: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 - qualitySettingsNames: [] projectName: organizationId: cloudEnabled: 0 + enableNativePlatformBackendsForNewInputSystem: 0 + disableOldInputManagerSupport: 0 legacyClampBlendShapeWeights: 0 - virtualTexturingSupportEnabled: 0 diff --git a/Unity-Package/ProjectSettings/ProjectVersion.txt b/Unity-Package/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..4c19129 --- /dev/null +++ b/Unity-Package/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2019.4.40f1 +m_EditorVersionWithRevision: 2019.4.40f1 (ffc62b691db5) diff --git a/Unity-Package/ProjectSettings/QualitySettings.asset b/Unity-Package/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..7c920b9 --- /dev/null +++ b/Unity-Package/ProjectSettings/QualitySettings.asset @@ -0,0 +1,240 @@ +%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 + CloudRendering: 5 + GameCoreScarlett: 5 + GameCoreXboxOne: 5 + Lumin: 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/Unity-Package/ProjectSettings/TagManager.asset b/Unity-Package/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..1c92a78 --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/TimeManager.asset b/Unity-Package/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..558a017 --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/UnityConnectSettings.asset b/Unity-Package/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..6125b30 --- /dev/null +++ b/Unity-Package/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,35 @@ +%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 + 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/Unity-Package/ProjectSettings/VFXManager.asset b/Unity-Package/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..46f38e1 --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/VersionControlSettings.asset b/Unity-Package/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/Unity-Package/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/Unity-Package/ProjectSettings/XRSettings.asset b/Unity-Package/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000..482590c --- /dev/null +++ b/Unity-Package/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/UserSettings/EditorUserSettings.asset b/Unity-Package/UserSettings/EditorUserSettings.asset similarity index 84% rename from UserSettings/EditorUserSettings.asset rename to Unity-Package/UserSettings/EditorUserSettings.asset index 2779f91..8d9f07c 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/Unity-Package/UserSettings/EditorUserSettings.asset @@ -9,6 +9,9 @@ EditorUserSettings: value: 22424703114646680e0b0227036c6c111b07142f623d28393930 flags: 0 RecentlyUsedScenePath-1: + value: 224247031146467f0803036d23205a1e1304570e292529043827183facf53a31f6fe + flags: 0 + RecentlyUsedScenePath-2: value: 224247031146467f0803036d23205a1e1304570e2925297e38271427fb flags: 0 vcSharedLogLevel: diff --git a/bump-version.ps1 b/bump-version.ps1 new file mode 100644 index 0000000..3e78b7e --- /dev/null +++ b/bump-version.ps1 @@ -0,0 +1,206 @@ +#!/usr/bin/env pwsh +<# +.SYNOPSIS + Automated version bumping script for the project + +.DESCRIPTION + Updates version numbers across all project files automatically to prevent human errors. + Supports preview mode for safe testing. + +.PARAMETER NewVersion + The new version number in semver format (e.g., "0.18.0") + +.PARAMETER WhatIf + Preview changes without applying them + +.EXAMPLE + .\bump-version.ps1 -NewVersion "0.18.0" + +.EXAMPLE + .\bump-version.ps1 -NewVersion "0.18.0" -WhatIf +#> + +param( + [Parameter(Mandatory = $true)] + [string]$NewVersion, + + [switch]$WhatIf +) + +# Script configuration +$ErrorActionPreference = "Stop" + +# Version file locations (relative to script root) +$VersionFiles = @( + @{ + Path = "README.md" + Pattern = "https://github\.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/[\d\.]+/Gyroscope-Parallax-Installer\.unitypackage" + Replace = "https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/{VERSION}/Gyroscope-Parallax-Installer.unitypackage" + Description = "Root README download URL" + }, + @{ + Path = "Unity-Package/Assets/root/README.md" + Pattern = "https://github\.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/[\d\.]+/Gyroscope-Parallax-Installer\.unitypackage" + Replace = "https://github.com/IvanMurzak/Unity-Gyroscope-Parallax/releases/download/{VERSION}/Gyroscope-Parallax-Installer.unitypackage" + Description = "Plugin README download URL" + }, + @{ + Path = "Installer/Assets/com.IvanMurzak/Gyroscope Parallax Installer/Installer.cs" + Pattern = 'public const string Version = "[\d\.]+";' + Replace = 'public const string Version = "{VERSION}";' + Description = "Installer C# version constant" + }, + @{ + Path = "Unity-Package/Assets/root/package.json" + Pattern = '"version":\s*"[\d\.]+"' + Replace = '"version": "{VERSION}"' + Description = "Unity package version" + } +) + +function Write-ColorText { + param([string]$Text, [string]$Color = "White") + Write-Host $Text -ForegroundColor $Color +} + +function Test-SemanticVersion { + param([string]$Version) + + if ([string]::IsNullOrWhiteSpace($Version)) { + return $false + } + + # Basic semver pattern: major.minor.patch (with optional prerelease/build) + $pattern = '^\d+\.\d+\.\d+(-[a-zA-Z0-9\-\.]+)?(\+[a-zA-Z0-9\-\.]+)?$' + return $Version -match $pattern +} + +function Get-CurrentVersion { + # Extract current version from package.json + $packageJsonPath = Join-Path $PSScriptRoot "Unity-Package/Assets/root/package.json" + if (-not (Test-Path $packageJsonPath)) { + throw "Could not find package.json at: $packageJsonPath" + } + + $content = Get-Content $packageJsonPath -Raw + if ($content -match '"version":\s*"([\d\.]+)"') { + return $Matches[1] + } + + throw "Could not extract current version from package.json" +} + +function Update-VersionFiles { + param([string]$OldVersion, [string]$NewVersion, [bool]$PreviewOnly = $false) + + $changes = @() + + foreach ($file in $VersionFiles) { + $fullPath = Join-Path $PSScriptRoot $file.Path + + if (-not (Test-Path $fullPath)) { + Write-ColorText "⚠️ File not found: $($file.Path)" "Yellow" + continue + } + + $content = Get-Content $fullPath -Raw + $originalContent = $content + + # Create the replacement string + $replacement = $file.Replace -replace '\{VERSION\}', $NewVersion + + # Apply the replacement + $newContent = $content -replace $file.Pattern, $replacement + + # Check if any changes were made + if ($originalContent -ne $newContent) { + # Count matches for reporting + $matches = [regex]::Matches($originalContent, $file.Pattern) + + $changes += @{ + Path = $file.Path + Description = $file.Description + Matches = $matches.Count + Content = $newContent + OriginalContent = $originalContent + } + + Write-ColorText "📝 $($file.Description): $($matches.Count) occurrence(s)" "Green" + + # Show the actual changes + foreach ($match in $matches) { + $newValue = $match.Value -replace $file.Pattern, $replacement + Write-ColorText " $($match.Value) → $newValue" "Gray" + } + } + else { + Write-ColorText "⚠️ No matches found in: $($file.Path)" "Yellow" + Write-ColorText " Pattern: $($file.Pattern)" "Gray" + } + } + + if ($changes.Count -eq 0) { + Write-ColorText "❌ No version references found to update!" "Red" + exit 1 + } + + if ($PreviewOnly) { + Write-ColorText "`n📋 Preview Summary:" "Cyan" + Write-ColorText "Files to be modified: $($changes.Count)" "White" + Write-ColorText "Total replacements: $(($changes | Measure-Object -Property Matches -Sum).Sum)" "White" + return $null + } + + # Apply changes + foreach ($change in $changes) { + $fullPath = Join-Path $PSScriptRoot $change.Path + Set-Content -Path $fullPath -Value $change.Content -NoNewline + } + + return $changes +} + +# Main execution +try { + Write-ColorText "🚀 Version Bump Script" "Cyan" + Write-ColorText "=================================" "Cyan" + + # Validate semantic version format + if (-not (Test-SemanticVersion $NewVersion)) { + Write-ColorText "❌ Invalid semantic version format: $NewVersion" "Red" + Write-ColorText "Expected format: major.minor.patch (e.g., '1.2.3')" "Yellow" + exit 1 + } + + # Get current version + $currentVersion = Get-CurrentVersion + Write-ColorText "📋 Current version: $currentVersion" "White" + Write-ColorText "📋 New version: $NewVersion" "White" + + if ($currentVersion -eq $NewVersion) { + Write-ColorText "⚠️ New version is the same as current version" "Yellow" + exit 0 + } + + Write-ColorText "`n🔍 Scanning for version references..." "Cyan" + + # Update version files + $changes = Update-VersionFiles -OldVersion $currentVersion -NewVersion $NewVersion -PreviewOnly $WhatIf + + if ($WhatIf) { + Write-ColorText "`n✅ Preview completed. Use without -WhatIf to apply changes." "Green" + exit 0 + } + + if ($changes -and $changes.Count -gt 0) { + Write-ColorText "`n🎉 Version bump completed successfully!" "Green" + Write-ColorText " Updated $($changes.Count) files" "White" + Write-ColorText " Total replacements: $(($changes | Measure-Object -Property Matches -Sum).Sum)" "White" + Write-ColorText " Version: $currentVersion → $NewVersion" "White" + Write-ColorText "`n💡 Remember to commit these changes to git" "Cyan" + } +} +catch { + Write-ColorText "`n❌ Script failed: $($_.Exception.Message)" "Red" + exit 1 +} \ No newline at end of file diff --git a/docs/img/unity-chan-parallax.gif b/docs/img/unity-chan-parallax.gif new file mode 100644 index 0000000..46a67f0 Binary files /dev/null and b/docs/img/unity-chan-parallax.gif differ