├── .gitattributes ├── .github └── workflows │ ├── activation.yaml │ ├── release.yaml │ └── test.yaml ├── .gitignore ├── .releaserc.json ├── Assets └── .gitkeep ├── LICENSE ├── Packages ├── com.careboo.burst-delegates │ ├── CHANGELOG.md │ ├── CHANGELOG.md.meta │ ├── CareBoo.Burst.Delegates.Tests.meta │ ├── CareBoo.Burst.Delegates.Tests │ │ ├── BurstDelegateTest.cs │ │ ├── BurstDelegateTest.cs.meta │ │ ├── CareBoo.Burst.Delegates.Tests.asmdef │ │ └── CareBoo.Burst.Delegates.Tests.asmdef.meta │ ├── CareBoo.Burst.Delegates.meta │ ├── CareBoo.Burst.Delegates │ │ ├── BurstAction.gen.cs │ │ ├── BurstAction.gen.cs.meta │ │ ├── BurstAction.tt │ │ ├── BurstAction.tt.meta │ │ ├── BurstFunc.gen.cs │ │ ├── BurstFunc.gen.cs.meta │ │ ├── BurstFunc.tt │ │ ├── BurstFunc.tt.meta │ │ ├── CareBoo.Burst.Delegates.asmdef │ │ ├── CareBoo.Burst.Delegates.asmdef.meta │ │ ├── DelegateCache.cs │ │ ├── DelegateCache.cs.meta │ │ ├── IAction.gen.cs │ │ ├── IAction.gen.cs.meta │ │ ├── IAction.tt │ │ ├── IAction.tt.meta │ │ ├── IFunc.gen.cs │ │ ├── IFunc.gen.cs.meta │ │ ├── IFunc.tt │ │ ├── IFunc.tt.meta │ │ ├── ValueAction.gen.cs │ │ ├── ValueAction.gen.cs.meta │ │ ├── ValueAction.tt │ │ ├── ValueAction.tt.meta │ │ ├── ValueFunc.gen.cs │ │ ├── ValueFunc.gen.cs.meta │ │ ├── ValueFunc.tt │ │ └── ValueFunc.tt.meta │ ├── README.md │ ├── README.md.meta │ ├── package.json │ └── package.json.meta ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── BurstAotSettings_Android.json ├── BurstAotSettings_StandaloneWindows.json ├── ClusterInputManager.asset ├── CommonBurstAotSettings.json ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md ├── UserSettings └── EditorUserSettings.asset ├── omnisharp.json └── scripts ├── coverageAssemblyFilters └── release /.gitattributes: -------------------------------------------------------------------------------- 1 | # Convert CRLF to LF on checkout for bash scripts 2 | *.sh text eol=lf 3 | -------------------------------------------------------------------------------- /.github/workflows/activation.yaml: -------------------------------------------------------------------------------- 1 | name: Acquire Unity Activation File 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | unityVersion: 7 | description: 'Unity Version to request an activation file from.' 8 | required: true 9 | 10 | jobs: 11 | activation: 12 | name: Request manual activation file 🔑 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Request manual activation file 16 | id: getManualLicenseFile 17 | uses: game-ci/unity-request-activation-file@v2.0-alpha-1 18 | with: 19 | unityVersion: ${{ github.event.inputs.unityVersion }} 20 | - name: Expose as artifact 21 | uses: actions/upload-artifact@v1 22 | with: 23 | name: ${{ steps.getManualLicenseFile.outputs.filePath }} 24 | path: ${{ steps.getManualLicenseFile.outputs.filePath }} 25 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Create Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - pre 8 | - exp 9 | - "[0-9]+.[0-9]+.[0-9]+" 10 | - "[0-9]+.[0-9]+.x" 11 | - "[0-9]+.x.x" 12 | 13 | jobs: 14 | release: 15 | name: Release New Version 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Semantic release 21 | id: semantic 22 | uses: cycjimmy/semantic-release-action@v2.1.3 23 | with: 24 | extra_plugins: | 25 | @semantic-release/changelog 26 | @semantic-release/git 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | 30 | - uses: actions/setup-node@v1 31 | with: 32 | node-version: "12.x" 33 | registry-url: "https://npm.pkg.github.com" 34 | scope: "@careboo" 35 | 36 | - name: Publish to GitHub Package Repository 37 | if: steps.semantic.outputs.new_release_published == 'true' 38 | run: ./scripts/release 39 | env: 40 | NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: Unity Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | env: 10 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2020 }} 11 | 12 | jobs: 13 | testAllModes: 14 | name: Test on version ${{ matrix.unityVersion }} 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | projectPath: 21 | - . 22 | unityVersion: 23 | - 2020.2.0f1 24 | 25 | steps: 26 | - uses: actions/checkout@v2 27 | with: 28 | lfs: true 29 | - name: Get Date 30 | id: get-date 31 | run: | 32 | echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" 33 | shell: bash 34 | - name: Cache Library 35 | uses: actions/cache@v2.1.1 36 | with: 37 | path: ${{ matrix.projectPath }}/Library 38 | key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ steps.get-date.outputs.date }} 39 | restore-keys: | 40 | Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}- 41 | Library-${{ matrix.projectPath }}- 42 | Library- 43 | - run: ./scripts/coverageAssemblyFilters 44 | id: assemblyFilters 45 | - uses: game-ci/unity-test-runner@v2.0-alpha-1 46 | id: tests 47 | with: 48 | projectPath: ${{ matrix.projectPath }} 49 | unityVersion: ${{ matrix.unityVersion }} 50 | artifactsPath: TestResults 51 | customParameters: -nographics -enableCodeCoverage -coverageOptions generateAdditionalMetrics;enableCyclomaticComplexity;assemblyFilters:${{ steps.assemblyFilters.outputs.result }} 52 | - name: Upload Test Results Artifacts 53 | uses: actions/upload-artifact@v1 54 | with: 55 | name: Test results 56 | path: ${{ steps.tests.outputs.artifactsPath }} 57 | - name: Upload Code Coverage Artifacts 58 | uses: actions/upload-artifact@v1 59 | with: 60 | name: Code Coverage 61 | path: ./CodeCoverage 62 | - name: Upload PlayMode Test Coverage Report 63 | uses: codecov/codecov-action@v1 64 | with: 65 | flags: unittests 66 | file: ./CodeCoverage/workspace-opencov/PlayMode/TestCoverageResults_0000.xml 67 | - name: Upload EditMode Test Coverage Report 68 | uses: codecov/codecov-action@v1 69 | with: 70 | flags: unittests 71 | file: ./CodeCoverage/workspace-opencov/EditMode/TestCoverageResults_0000.xml 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | /[Cc]odeCoverage/ 13 | /ProjectSettings/Packages/ 14 | 15 | # Asset meta data should only be ignored when the corresponding asset is also ignored 16 | !/[Aa]ssets/**/*.meta 17 | 18 | # Uncomment this line if you wish to ignore the asset store tools plugin 19 | # /[Aa]ssets/AssetStoreTools* 20 | 21 | # Autogenerated Jetbrains Rider plugin 22 | [Aa]ssets/Plugins/Editor/JetBrains* 23 | 24 | # Visual Studio cache directory 25 | .vs/ 26 | 27 | # Visual Studio Code preferences 28 | .vscode/ 29 | 30 | # Gradle cache directory 31 | .gradle/ 32 | 33 | # Autogenerated VS/MD/Consulo solution and project files 34 | ExportedObj/ 35 | .consulo/ 36 | *.csproj 37 | *.unityproj 38 | *.sln 39 | *.suo 40 | *.tmp 41 | *.user 42 | *.userprefs 43 | *.pidb 44 | *.booproj 45 | *.svd 46 | *.pdb 47 | *.mdb 48 | *.opendb 49 | *.VC.db 50 | 51 | # Unity3D generated meta files 52 | *.pidb.meta 53 | *.pdb.meta 54 | *.mdb.meta 55 | 56 | # Unity3D generated file on crash reports 57 | sysinfo.txt 58 | 59 | # Builds 60 | *.apk 61 | *.unitypackage 62 | 63 | # Crashlytics generated file 64 | crashlytics-build.properties 65 | 66 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagFormat": "v${version}", 3 | "plugins": [ 4 | [ 5 | "@semantic-release/commit-analyzer", 6 | { 7 | "preset": "angular" 8 | } 9 | ], 10 | "@semantic-release/release-notes-generator", 11 | [ 12 | "@semantic-release/changelog", 13 | { 14 | "preset": "angular", 15 | "changelogFile": "Packages/com.careboo.burst-delegates/CHANGELOG.md", 16 | "changelogTitle": "# Changelog\nAll notable changes to this package will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)." 17 | } 18 | ], 19 | [ 20 | "@semantic-release/npm", 21 | { 22 | "npmPublish": false, 23 | "pkgRoot": "Packages/com.careboo.burst-delegates" 24 | } 25 | ], 26 | [ 27 | "@semantic-release/git", 28 | { 29 | "assets": [ 30 | "Packages/com.careboo.burst-delegates/package.json", 31 | "Packages/com.careboo.burst-delegates/CHANGELOG.md" 32 | ], 33 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 34 | } 35 | ], 36 | "@semantic-release/github" 37 | ], 38 | "branches": [ 39 | "+([0-9])?(.{+([0-9]),x}).x", 40 | "master", 41 | { 42 | "name": "pre", 43 | "prerelease": true 44 | }, 45 | { 46 | "name": "exp", 47 | "prerelease": true 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CareBoo/Burst.Delegates/d71269b0f048169deec27e1ec6411e8d31f6d0fe/Assets/.gitkeep -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 CareBoo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this package will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 5 | 6 | # [1.2.0](https://github.com/CareBoo/Burst.Delegates/compare/v1.1.0...v1.2.0) (2021-03-10) 7 | 8 | 9 | ### Bug Fixes 10 | 11 | * :bug: Fix BurstAction and BurstFunc so they don't throw exceptions ([8c7cc97](https://github.com/CareBoo/Burst.Delegates/commit/8c7cc97609f79700ce2485a5bfc000fc9f77600e)) 12 | * :bug: Fix missing dependency ([c84691a](https://github.com/CareBoo/Burst.Delegates/commit/c84691a29039d5bfadbc1e913145d26583489604)) 13 | 14 | 15 | ### Features 16 | 17 | * :sparkles: Add Compile implementation to Value Delegates ([24271cd](https://github.com/CareBoo/Burst.Delegates/commit/24271cd36aa308f57a8ee81c17e160e1e3fae54a)) 18 | * :sparkles: Add FunctionPointer compatible Value Delegates ([5538a6f](https://github.com/CareBoo/Burst.Delegates/commit/5538a6f44e9b0e72a7e73b33a45f47b66276016f)) 19 | * :sparkles: Add implicit conversion between BurstDelegates and ValueDelegates ([5d0f915](https://github.com/CareBoo/Burst.Delegates/commit/5d0f91533e36cc5df9f8d2deb4b36a9a824a8bd7)) 20 | * :sparkles: Introduce working generic FuncPointer ([8c8be4f](https://github.com/CareBoo/Burst.Delegates/commit/8c8be4f55b5471c516182cb0db187761ddc9b42d)) 21 | 22 | # [1.2.0-preview.5](https://github.com/CareBoo/Burst.Delegates/compare/v1.2.0-preview.4...v1.2.0-preview.5) (2020-12-17) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * :bug: Fix missing dependency ([369826a](https://github.com/CareBoo/Burst.Delegates/commit/369826ad174b42c4b8406b84d79c648be0084aa5)) 28 | 29 | # [1.2.0-preview.4](https://github.com/CareBoo/Burst.Delegates/compare/v1.2.0-preview.3...v1.2.0-preview.4) (2020-12-16) 30 | 31 | 32 | ### Features 33 | 34 | * :sparkles: Introduce working generic FuncPointer ([e74a2c8](https://github.com/CareBoo/Burst.Delegates/commit/e74a2c889f363cb022b3ad0268babee9f4165bca)) 35 | 36 | # [1.2.0-preview.3](https://github.com/CareBoo/Burst.Delegates/compare/v1.2.0-preview.2...v1.2.0-preview.3) (2020-12-15) 37 | 38 | 39 | ### Bug Fixes 40 | 41 | * :bug: Fix BurstAction and BurstFunc so they don't throw exceptions ([3ea2f3c](https://github.com/CareBoo/Burst.Delegates/commit/3ea2f3c84b7c6149e3303c939cdeed5a35120c44)) 42 | 43 | # [1.2.0-preview.2](https://github.com/CareBoo/Burst.Delegates/compare/v1.2.0-preview.1...v1.2.0-preview.2) (2020-12-15) 44 | 45 | 46 | ### Features 47 | 48 | * :sparkles: Add implicit conversion between BurstDelegates and ValueDelegates ([9d5542c](https://github.com/CareBoo/Burst.Delegates/commit/9d5542cf9beac7372877ad5a8b36423662ea99fc)) 49 | 50 | # [1.2.0-preview.1](https://github.com/CareBoo/Burst.Delegates/compare/v1.1.0...v1.2.0-preview.1) (2020-12-15) 51 | 52 | 53 | ### Features 54 | 55 | * :sparkles: Add Compile implementation to Value Delegates ([0f2032f](https://github.com/CareBoo/Burst.Delegates/commit/0f2032f5cd5185511e7a847f2a08f73c07f96a76)) 56 | * :sparkles: Add FunctionPointer compatible Value Delegates ([1b7940b](https://github.com/CareBoo/Burst.Delegates/commit/1b7940b47064f69f0d723a0a0237f9e1320885ff)) 57 | 58 | # [1.1.0](https://github.com/CareBoo/Burst.Delegates/compare/v1.0.0...v1.1.0) (2020-10-26) 59 | 60 | 61 | ### Features 62 | 63 | * :sparkles: Support parameterless `New` ([3b627c2](https://github.com/CareBoo/Burst.Delegates/commit/3b627c236e40a9ae96771df282e79242c448591a)) 64 | 65 | # 1.0.0 (2020-10-26) 66 | 67 | 68 | ### Features 69 | 70 | * :sparkles: Implement struct-based API ([6110094](https://github.com/CareBoo/Burst.Delegates/commit/6110094ebcab28afac7b69e7c5e9d95eec32b1ea)) 71 | 72 | # 1.0.0-preview.1 (2020-10-26) 73 | 74 | 75 | ### Features 76 | 77 | * :sparkles: Implement struct-based API ([6110094](https://github.com/CareBoo/Burst.Delegates/commit/6110094ebcab28afac7b69e7c5e9d95eec32b1ea)) 78 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e821325d3fa7f6a489825dd01ae66a50 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e977b66e8e3e2a4ba526f305e567ae4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.Tests/BurstDelegateTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.RegularExpressions; 3 | using CareBoo.Burst.Delegates; 4 | using NUnit.Framework; 5 | using Unity.Burst; 6 | using Unity.Collections; 7 | using Unity.Jobs; 8 | using UnityEngine.TestTools; 9 | 10 | [BurstCompile] 11 | internal class BurstDelegateTests 12 | { 13 | [BurstCompile] 14 | public struct CallFuncJob : IJob 15 | { 16 | [ReadOnly] 17 | public ValueFunc.Struct> Func; 18 | 19 | [ReadOnly] 20 | public NativeArray Input; 21 | 22 | [WriteOnly] 23 | public NativeArray Output; 24 | 25 | public void Execute() 26 | { 27 | Output[0] = Func.Invoke(Input[0]); 28 | } 29 | } 30 | 31 | [BurstCompile] 32 | public static int Add4(int val) => val + 4; 33 | 34 | public static readonly BurstFunc Add4Func = BurstFunc.Compile(Add4); 35 | 36 | [Test] 37 | public void TestCanInvokeInsideOfBurstedCode() 38 | { 39 | using (var input = new NativeArray(new int[1], Allocator.Persistent)) 40 | using (var output = new NativeArray(new int[1], Allocator.Persistent)) 41 | { 42 | var expected = Add4(input[0]); 43 | new CallFuncJob { Func = Add4Func, Input = input, Output = output }.Run(); 44 | var actual = output[0]; 45 | Assert.AreEqual(expected, actual); 46 | } 47 | } 48 | 49 | [Test] 50 | public void TestCannotInvokeOutsideOfBurstedCode() 51 | { 52 | using (var input = new NativeArray(new int[1], Allocator.Persistent)) 53 | using (var output = new NativeArray(new int[1], Allocator.Persistent)) 54 | { 55 | var expected = Add4(input[0]); 56 | var actual = Add4Func.Invoke(input[0]); 57 | Assert.AreEqual(expected, actual); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.Tests/BurstDelegateTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d66f5c3e09342141b06456f5c7054ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.Tests/CareBoo.Burst.Delegates.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CareBoo.Burst.Delegates.Tests", 3 | "references": [ 4 | "UnityEngine.TestRunner", 5 | "CareBoo.Burst.Delegates", 6 | "Unity.Burst" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": true, 12 | "precompiledReferences": [ 13 | "nunit.framework.dll" 14 | ], 15 | "autoReferenced": false, 16 | "defineConstraints": [ 17 | "UNITY_INCLUDE_TESTS" 18 | ], 19 | "versionDefines": [], 20 | "noEngineReferences": false 21 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.Tests/CareBoo.Burst.Delegates.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4d1051c32bbe6d44853b76b3430a2a6 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d68220175943d04f9144b2d6f907051 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstAction.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | using System; 15 | using Unity.Burst; 16 | 17 | namespace CareBoo.Burst.Delegates 18 | { 19 | 20 | public struct BurstAction 21 | : IAction 22 | { 23 | readonly FunctionPointer functionPointer; 24 | 25 | bool burstEnabled; 26 | 27 | public BurstAction(FunctionPointer functionPointer) 28 | { 29 | this.functionPointer = functionPointer; 30 | burstEnabled = true; 31 | } 32 | 33 | public void Invoke() 34 | { 35 | CheckBurst(); 36 | 37 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 38 | if (burstEnabled) 39 | functionPointer.Invoke(); 40 | } 41 | 42 | [BurstDiscard] 43 | private void CheckBurst() 44 | { 45 | burstEnabled = false; 46 | DelegateCache.GetDelegate(functionPointer.Value).Invoke(); 47 | } 48 | 49 | public static BurstAction Compile(Action action) 50 | { 51 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 52 | DelegateCache.SetDelegate(functionPointer.Value, action); 53 | return new BurstAction(functionPointer); 54 | } 55 | 56 | public static implicit operator ValueAction.Struct(BurstAction burstAction) 57 | { 58 | return ValueAction.New(burstAction); 59 | } 60 | 61 | public static implicit operator BurstAction(ValueAction.Struct valueAction) 62 | { 63 | return valueAction.lambda; 64 | } 65 | } 66 | 67 | 68 | public struct BurstAction 69 | : IAction 70 | where T : struct 71 | { 72 | readonly FunctionPointer> functionPointer; 73 | 74 | bool burstEnabled; 75 | 76 | public BurstAction(FunctionPointer> functionPointer) 77 | { 78 | this.functionPointer = functionPointer; 79 | burstEnabled = true; 80 | } 81 | 82 | public void Invoke(T arg0) 83 | { 84 | CheckBurst(arg0); 85 | 86 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 87 | if (burstEnabled) 88 | functionPointer.Invoke(arg0); 89 | } 90 | 91 | [BurstDiscard] 92 | private void CheckBurst(T arg0) 93 | { 94 | burstEnabled = false; 95 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0); 96 | } 97 | 98 | public static BurstAction Compile(Action action) 99 | { 100 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 101 | DelegateCache>.SetDelegate(functionPointer.Value, action); 102 | return new BurstAction(functionPointer); 103 | } 104 | 105 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 106 | { 107 | return ValueAction.New(burstAction); 108 | } 109 | 110 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 111 | { 112 | return valueAction.lambda; 113 | } 114 | } 115 | 116 | 117 | public struct BurstAction 118 | : IAction 119 | where T : struct 120 | where U : struct 121 | { 122 | readonly FunctionPointer> functionPointer; 123 | 124 | bool burstEnabled; 125 | 126 | public BurstAction(FunctionPointer> functionPointer) 127 | { 128 | this.functionPointer = functionPointer; 129 | burstEnabled = true; 130 | } 131 | 132 | public void Invoke(T arg0, U arg1) 133 | { 134 | CheckBurst(arg0, arg1); 135 | 136 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 137 | if (burstEnabled) 138 | functionPointer.Invoke(arg0, arg1); 139 | } 140 | 141 | [BurstDiscard] 142 | private void CheckBurst(T arg0, U arg1) 143 | { 144 | burstEnabled = false; 145 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1); 146 | } 147 | 148 | public static BurstAction Compile(Action action) 149 | { 150 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 151 | DelegateCache>.SetDelegate(functionPointer.Value, action); 152 | return new BurstAction(functionPointer); 153 | } 154 | 155 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 156 | { 157 | return ValueAction.New(burstAction); 158 | } 159 | 160 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 161 | { 162 | return valueAction.lambda; 163 | } 164 | } 165 | 166 | 167 | public struct BurstAction 168 | : IAction 169 | where T : struct 170 | where U : struct 171 | where V : struct 172 | { 173 | readonly FunctionPointer> functionPointer; 174 | 175 | bool burstEnabled; 176 | 177 | public BurstAction(FunctionPointer> functionPointer) 178 | { 179 | this.functionPointer = functionPointer; 180 | burstEnabled = true; 181 | } 182 | 183 | public void Invoke(T arg0, U arg1, V arg2) 184 | { 185 | CheckBurst(arg0, arg1, arg2); 186 | 187 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 188 | if (burstEnabled) 189 | functionPointer.Invoke(arg0, arg1, arg2); 190 | } 191 | 192 | [BurstDiscard] 193 | private void CheckBurst(T arg0, U arg1, V arg2) 194 | { 195 | burstEnabled = false; 196 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2); 197 | } 198 | 199 | public static BurstAction Compile(Action action) 200 | { 201 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 202 | DelegateCache>.SetDelegate(functionPointer.Value, action); 203 | return new BurstAction(functionPointer); 204 | } 205 | 206 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 207 | { 208 | return ValueAction.New(burstAction); 209 | } 210 | 211 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 212 | { 213 | return valueAction.lambda; 214 | } 215 | } 216 | 217 | 218 | public struct BurstAction 219 | : IAction 220 | where T : struct 221 | where U : struct 222 | where V : struct 223 | where W : struct 224 | { 225 | readonly FunctionPointer> functionPointer; 226 | 227 | bool burstEnabled; 228 | 229 | public BurstAction(FunctionPointer> functionPointer) 230 | { 231 | this.functionPointer = functionPointer; 232 | burstEnabled = true; 233 | } 234 | 235 | public void Invoke(T arg0, U arg1, V arg2, W arg3) 236 | { 237 | CheckBurst(arg0, arg1, arg2, arg3); 238 | 239 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 240 | if (burstEnabled) 241 | functionPointer.Invoke(arg0, arg1, arg2, arg3); 242 | } 243 | 244 | [BurstDiscard] 245 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3) 246 | { 247 | burstEnabled = false; 248 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3); 249 | } 250 | 251 | public static BurstAction Compile(Action action) 252 | { 253 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 254 | DelegateCache>.SetDelegate(functionPointer.Value, action); 255 | return new BurstAction(functionPointer); 256 | } 257 | 258 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 259 | { 260 | return ValueAction.New(burstAction); 261 | } 262 | 263 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 264 | { 265 | return valueAction.lambda; 266 | } 267 | } 268 | 269 | 270 | public struct BurstAction 271 | : IAction 272 | where T : struct 273 | where U : struct 274 | where V : struct 275 | where W : struct 276 | where X : struct 277 | { 278 | readonly FunctionPointer> functionPointer; 279 | 280 | bool burstEnabled; 281 | 282 | public BurstAction(FunctionPointer> functionPointer) 283 | { 284 | this.functionPointer = functionPointer; 285 | burstEnabled = true; 286 | } 287 | 288 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4) 289 | { 290 | CheckBurst(arg0, arg1, arg2, arg3, arg4); 291 | 292 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 293 | if (burstEnabled) 294 | functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4); 295 | } 296 | 297 | [BurstDiscard] 298 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4) 299 | { 300 | burstEnabled = false; 301 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4); 302 | } 303 | 304 | public static BurstAction Compile(Action action) 305 | { 306 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 307 | DelegateCache>.SetDelegate(functionPointer.Value, action); 308 | return new BurstAction(functionPointer); 309 | } 310 | 311 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 312 | { 313 | return ValueAction.New(burstAction); 314 | } 315 | 316 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 317 | { 318 | return valueAction.lambda; 319 | } 320 | } 321 | 322 | 323 | public struct BurstAction 324 | : IAction 325 | where T : struct 326 | where U : struct 327 | where V : struct 328 | where W : struct 329 | where X : struct 330 | where Y : struct 331 | { 332 | readonly FunctionPointer> functionPointer; 333 | 334 | bool burstEnabled; 335 | 336 | public BurstAction(FunctionPointer> functionPointer) 337 | { 338 | this.functionPointer = functionPointer; 339 | burstEnabled = true; 340 | } 341 | 342 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 343 | { 344 | CheckBurst(arg0, arg1, arg2, arg3, arg4, arg5); 345 | 346 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 347 | if (burstEnabled) 348 | functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 349 | } 350 | 351 | [BurstDiscard] 352 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 353 | { 354 | burstEnabled = false; 355 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 356 | } 357 | 358 | public static BurstAction Compile(Action action) 359 | { 360 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 361 | DelegateCache>.SetDelegate(functionPointer.Value, action); 362 | return new BurstAction(functionPointer); 363 | } 364 | 365 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 366 | { 367 | return ValueAction.New(burstAction); 368 | } 369 | 370 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 371 | { 372 | return valueAction.lambda; 373 | } 374 | } 375 | 376 | 377 | public struct BurstAction 378 | : IAction 379 | where T : struct 380 | where U : struct 381 | where V : struct 382 | where W : struct 383 | where X : struct 384 | where Y : struct 385 | where Z : struct 386 | { 387 | readonly FunctionPointer> functionPointer; 388 | 389 | bool burstEnabled; 390 | 391 | public BurstAction(FunctionPointer> functionPointer) 392 | { 393 | this.functionPointer = functionPointer; 394 | burstEnabled = true; 395 | } 396 | 397 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 398 | { 399 | CheckBurst(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 400 | 401 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 402 | if (burstEnabled) 403 | functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 404 | } 405 | 406 | [BurstDiscard] 407 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 408 | { 409 | burstEnabled = false; 410 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 411 | } 412 | 413 | public static BurstAction Compile(Action action) 414 | { 415 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 416 | DelegateCache>.SetDelegate(functionPointer.Value, action); 417 | return new BurstAction(functionPointer); 418 | } 419 | 420 | public static implicit operator ValueAction.Struct>(BurstAction burstAction) 421 | { 422 | return ValueAction.New(burstAction); 423 | } 424 | 425 | public static implicit operator BurstAction(ValueAction.Struct> valueAction) 426 | { 427 | return valueAction.lambda; 428 | } 429 | } 430 | 431 | 432 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstAction.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd0980a1ffca0614391b4eae64afed06 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstAction.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | using System; 15 | using Unity.Burst; 16 | 17 | namespace CareBoo.Burst.Delegates 18 | { 19 | <# 20 | var GENERIC_PARAMS = new[] 21 | { 22 | "", 23 | "T", 24 | "U", 25 | "V", 26 | "W", 27 | "X", 28 | "Y", 29 | "Z" 30 | }; 31 | 32 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 33 | { 34 | var GENERIC_CONSTRAINTS = ""; 35 | for (var j = 1; j <= i; j++) 36 | { 37 | GENERIC_CONSTRAINTS += $"\n where {GENERIC_PARAMS[j]} : struct"; 38 | } 39 | 40 | var GENERIC_DEF = i > 0 ? $"<{string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i))}>" : ""; 41 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 42 | var GENERIC_ARGS = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"arg{n}")); 43 | 44 | #> 45 | public struct BurstAction<#=GENERIC_DEF#> 46 | : IAction<#=GENERIC_DEF#><#=GENERIC_CONSTRAINTS#> 47 | { 48 | readonly FunctionPointer> functionPointer; 49 | 50 | bool burstEnabled; 51 | 52 | public BurstAction(FunctionPointer> functionPointer) 53 | { 54 | this.functionPointer = functionPointer; 55 | burstEnabled = true; 56 | } 57 | 58 | public void Invoke(<#=GENERIC_ARGS_TYPED#>) 59 | { 60 | CheckBurst(<#=GENERIC_ARGS#>); 61 | 62 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 63 | if (burstEnabled) 64 | functionPointer.Invoke(<#=GENERIC_ARGS#>); 65 | } 66 | 67 | [BurstDiscard] 68 | private void CheckBurst(<#=GENERIC_ARGS_TYPED#>) 69 | { 70 | burstEnabled = false; 71 | DelegateCache>.GetDelegate(functionPointer.Value).Invoke(<#=GENERIC_ARGS#>); 72 | } 73 | 74 | public static BurstAction<#=GENERIC_DEF#> Compile(Action<#=GENERIC_DEF#> action) 75 | { 76 | var functionPointer = BurstCompiler.CompileFunctionPointer(action); 77 | DelegateCache>.SetDelegate(functionPointer.Value, action); 78 | return new BurstAction<#=GENERIC_DEF#>(functionPointer); 79 | } 80 | 81 | public static implicit operator ValueAction<#=GENERIC_DEF#>.Struct>(BurstAction<#=GENERIC_DEF#> burstAction) 82 | { 83 | return ValueAction<#=GENERIC_DEF#>.New(burstAction); 84 | } 85 | 86 | public static implicit operator BurstAction<#=GENERIC_DEF#>(ValueAction<#=GENERIC_DEF#>.Struct> valueAction) 87 | { 88 | return valueAction.lambda; 89 | } 90 | } 91 | 92 | <# 93 | } 94 | #> 95 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstAction.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77d6c7c3998b35d4785b00110f0f0b7d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstFunc.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | using System; 15 | using Unity.Burst; 16 | 17 | namespace CareBoo.Burst.Delegates 18 | { 19 | 20 | public struct BurstFunc 21 | : IFunc 22 | where TResult : struct 23 | { 24 | readonly FunctionPointer> functionPointer; 25 | 26 | bool burstEnabled; 27 | 28 | TResult value; 29 | 30 | public BurstFunc(FunctionPointer> functionPointer) 31 | { 32 | this.functionPointer = functionPointer; 33 | burstEnabled = true; 34 | value = default; 35 | } 36 | 37 | public TResult Invoke() 38 | { 39 | CheckBurst(); 40 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 41 | 42 | if (burstEnabled) 43 | return functionPointer.Invoke(); 44 | else 45 | return value; 46 | } 47 | 48 | [BurstDiscard] 49 | private void CheckBurst() 50 | { 51 | burstEnabled = false; 52 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(); 53 | } 54 | 55 | public static BurstFunc Compile(Func func) 56 | { 57 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 58 | DelegateCache>.SetDelegate(functionPointer.Value, func); 59 | return new BurstFunc(functionPointer); 60 | } 61 | 62 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 63 | { 64 | return ValueFunc.New(burstFunc); 65 | } 66 | 67 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 68 | { 69 | return valueFunc.lambda; 70 | } 71 | } 72 | 73 | 74 | public struct BurstFunc 75 | : IFunc 76 | where T : struct 77 | where TResult : struct 78 | { 79 | readonly FunctionPointer> functionPointer; 80 | 81 | bool burstEnabled; 82 | 83 | TResult value; 84 | 85 | public BurstFunc(FunctionPointer> functionPointer) 86 | { 87 | this.functionPointer = functionPointer; 88 | burstEnabled = true; 89 | value = default; 90 | } 91 | 92 | public TResult Invoke(T arg0) 93 | { 94 | CheckBurst(arg0); 95 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 96 | 97 | if (burstEnabled) 98 | return functionPointer.Invoke(arg0); 99 | else 100 | return value; 101 | } 102 | 103 | [BurstDiscard] 104 | private void CheckBurst(T arg0) 105 | { 106 | burstEnabled = false; 107 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0); 108 | } 109 | 110 | public static BurstFunc Compile(Func func) 111 | { 112 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 113 | DelegateCache>.SetDelegate(functionPointer.Value, func); 114 | return new BurstFunc(functionPointer); 115 | } 116 | 117 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 118 | { 119 | return ValueFunc.New(burstFunc); 120 | } 121 | 122 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 123 | { 124 | return valueFunc.lambda; 125 | } 126 | } 127 | 128 | 129 | public struct BurstFunc 130 | : IFunc 131 | where T : struct 132 | where U : struct 133 | where TResult : struct 134 | { 135 | readonly FunctionPointer> functionPointer; 136 | 137 | bool burstEnabled; 138 | 139 | TResult value; 140 | 141 | public BurstFunc(FunctionPointer> functionPointer) 142 | { 143 | this.functionPointer = functionPointer; 144 | burstEnabled = true; 145 | value = default; 146 | } 147 | 148 | public TResult Invoke(T arg0, U arg1) 149 | { 150 | CheckBurst(arg0, arg1); 151 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 152 | 153 | if (burstEnabled) 154 | return functionPointer.Invoke(arg0, arg1); 155 | else 156 | return value; 157 | } 158 | 159 | [BurstDiscard] 160 | private void CheckBurst(T arg0, U arg1) 161 | { 162 | burstEnabled = false; 163 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1); 164 | } 165 | 166 | public static BurstFunc Compile(Func func) 167 | { 168 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 169 | DelegateCache>.SetDelegate(functionPointer.Value, func); 170 | return new BurstFunc(functionPointer); 171 | } 172 | 173 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 174 | { 175 | return ValueFunc.New(burstFunc); 176 | } 177 | 178 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 179 | { 180 | return valueFunc.lambda; 181 | } 182 | } 183 | 184 | 185 | public struct BurstFunc 186 | : IFunc 187 | where T : struct 188 | where U : struct 189 | where V : struct 190 | where TResult : struct 191 | { 192 | readonly FunctionPointer> functionPointer; 193 | 194 | bool burstEnabled; 195 | 196 | TResult value; 197 | 198 | public BurstFunc(FunctionPointer> functionPointer) 199 | { 200 | this.functionPointer = functionPointer; 201 | burstEnabled = true; 202 | value = default; 203 | } 204 | 205 | public TResult Invoke(T arg0, U arg1, V arg2) 206 | { 207 | CheckBurst(arg0, arg1, arg2); 208 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 209 | 210 | if (burstEnabled) 211 | return functionPointer.Invoke(arg0, arg1, arg2); 212 | else 213 | return value; 214 | } 215 | 216 | [BurstDiscard] 217 | private void CheckBurst(T arg0, U arg1, V arg2) 218 | { 219 | burstEnabled = false; 220 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2); 221 | } 222 | 223 | public static BurstFunc Compile(Func func) 224 | { 225 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 226 | DelegateCache>.SetDelegate(functionPointer.Value, func); 227 | return new BurstFunc(functionPointer); 228 | } 229 | 230 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 231 | { 232 | return ValueFunc.New(burstFunc); 233 | } 234 | 235 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 236 | { 237 | return valueFunc.lambda; 238 | } 239 | } 240 | 241 | 242 | public struct BurstFunc 243 | : IFunc 244 | where T : struct 245 | where U : struct 246 | where V : struct 247 | where W : struct 248 | where TResult : struct 249 | { 250 | readonly FunctionPointer> functionPointer; 251 | 252 | bool burstEnabled; 253 | 254 | TResult value; 255 | 256 | public BurstFunc(FunctionPointer> functionPointer) 257 | { 258 | this.functionPointer = functionPointer; 259 | burstEnabled = true; 260 | value = default; 261 | } 262 | 263 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3) 264 | { 265 | CheckBurst(arg0, arg1, arg2, arg3); 266 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 267 | 268 | if (burstEnabled) 269 | return functionPointer.Invoke(arg0, arg1, arg2, arg3); 270 | else 271 | return value; 272 | } 273 | 274 | [BurstDiscard] 275 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3) 276 | { 277 | burstEnabled = false; 278 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3); 279 | } 280 | 281 | public static BurstFunc Compile(Func func) 282 | { 283 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 284 | DelegateCache>.SetDelegate(functionPointer.Value, func); 285 | return new BurstFunc(functionPointer); 286 | } 287 | 288 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 289 | { 290 | return ValueFunc.New(burstFunc); 291 | } 292 | 293 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 294 | { 295 | return valueFunc.lambda; 296 | } 297 | } 298 | 299 | 300 | public struct BurstFunc 301 | : IFunc 302 | where T : struct 303 | where U : struct 304 | where V : struct 305 | where W : struct 306 | where X : struct 307 | where TResult : struct 308 | { 309 | readonly FunctionPointer> functionPointer; 310 | 311 | bool burstEnabled; 312 | 313 | TResult value; 314 | 315 | public BurstFunc(FunctionPointer> functionPointer) 316 | { 317 | this.functionPointer = functionPointer; 318 | burstEnabled = true; 319 | value = default; 320 | } 321 | 322 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4) 323 | { 324 | CheckBurst(arg0, arg1, arg2, arg3, arg4); 325 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 326 | 327 | if (burstEnabled) 328 | return functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4); 329 | else 330 | return value; 331 | } 332 | 333 | [BurstDiscard] 334 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4) 335 | { 336 | burstEnabled = false; 337 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4); 338 | } 339 | 340 | public static BurstFunc Compile(Func func) 341 | { 342 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 343 | DelegateCache>.SetDelegate(functionPointer.Value, func); 344 | return new BurstFunc(functionPointer); 345 | } 346 | 347 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 348 | { 349 | return ValueFunc.New(burstFunc); 350 | } 351 | 352 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 353 | { 354 | return valueFunc.lambda; 355 | } 356 | } 357 | 358 | 359 | public struct BurstFunc 360 | : IFunc 361 | where T : struct 362 | where U : struct 363 | where V : struct 364 | where W : struct 365 | where X : struct 366 | where Y : struct 367 | where TResult : struct 368 | { 369 | readonly FunctionPointer> functionPointer; 370 | 371 | bool burstEnabled; 372 | 373 | TResult value; 374 | 375 | public BurstFunc(FunctionPointer> functionPointer) 376 | { 377 | this.functionPointer = functionPointer; 378 | burstEnabled = true; 379 | value = default; 380 | } 381 | 382 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 383 | { 384 | CheckBurst(arg0, arg1, arg2, arg3, arg4, arg5); 385 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 386 | 387 | if (burstEnabled) 388 | return functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 389 | else 390 | return value; 391 | } 392 | 393 | [BurstDiscard] 394 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 395 | { 396 | burstEnabled = false; 397 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 398 | } 399 | 400 | public static BurstFunc Compile(Func func) 401 | { 402 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 403 | DelegateCache>.SetDelegate(functionPointer.Value, func); 404 | return new BurstFunc(functionPointer); 405 | } 406 | 407 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 408 | { 409 | return ValueFunc.New(burstFunc); 410 | } 411 | 412 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 413 | { 414 | return valueFunc.lambda; 415 | } 416 | } 417 | 418 | 419 | public struct BurstFunc 420 | : IFunc 421 | where T : struct 422 | where U : struct 423 | where V : struct 424 | where W : struct 425 | where X : struct 426 | where Y : struct 427 | where Z : struct 428 | where TResult : struct 429 | { 430 | readonly FunctionPointer> functionPointer; 431 | 432 | bool burstEnabled; 433 | 434 | TResult value; 435 | 436 | public BurstFunc(FunctionPointer> functionPointer) 437 | { 438 | this.functionPointer = functionPointer; 439 | burstEnabled = true; 440 | value = default; 441 | } 442 | 443 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 444 | { 445 | CheckBurst(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 446 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 447 | 448 | if (burstEnabled) 449 | return functionPointer.Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 450 | else 451 | return value; 452 | } 453 | 454 | [BurstDiscard] 455 | private void CheckBurst(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 456 | { 457 | burstEnabled = false; 458 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 459 | } 460 | 461 | public static BurstFunc Compile(Func func) 462 | { 463 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 464 | DelegateCache>.SetDelegate(functionPointer.Value, func); 465 | return new BurstFunc(functionPointer); 466 | } 467 | 468 | public static implicit operator ValueFunc.Struct>(BurstFunc burstFunc) 469 | { 470 | return ValueFunc.New(burstFunc); 471 | } 472 | 473 | public static implicit operator BurstFunc(ValueFunc.Struct> valueFunc) 474 | { 475 | return valueFunc.lambda; 476 | } 477 | } 478 | 479 | 480 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstFunc.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0d1ca373a3092b478855a45ab5bc35a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstFunc.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | using System; 15 | using Unity.Burst; 16 | 17 | namespace CareBoo.Burst.Delegates 18 | { 19 | <# 20 | var GENERIC_PARAMS = new[] 21 | { 22 | "", 23 | "T", 24 | "U", 25 | "V", 26 | "W", 27 | "X", 28 | "Y", 29 | "Z" 30 | }; 31 | 32 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 33 | { 34 | var GENERIC_DEF = ""; 35 | var GENERIC_CONSTRAINTS = ""; 36 | for (var j = 1; j <= i; j++) 37 | { 38 | GENERIC_DEF += $"{GENERIC_PARAMS[j]}, "; 39 | GENERIC_CONSTRAINTS += $"where {GENERIC_PARAMS[j]} : struct\n "; 40 | } 41 | 42 | GENERIC_DEF = $"<{GENERIC_DEF}TResult>"; 43 | GENERIC_CONSTRAINTS += "where TResult : struct"; 44 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 45 | var GENERIC_ARGS = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"arg{n}")); 46 | 47 | #> 48 | public struct BurstFunc<#=GENERIC_DEF#> 49 | : IFunc<#=GENERIC_DEF#> 50 | <#=GENERIC_CONSTRAINTS#> 51 | { 52 | readonly FunctionPointer> functionPointer; 53 | 54 | bool burstEnabled; 55 | 56 | TResult value; 57 | 58 | public BurstFunc(FunctionPointer> functionPointer) 59 | { 60 | this.functionPointer = functionPointer; 61 | burstEnabled = true; 62 | value = default; 63 | } 64 | 65 | public TResult Invoke(<#=GENERIC_ARGS_TYPED#>) 66 | { 67 | CheckBurst(<#=GENERIC_ARGS#>); 68 | Unity.Burst.CompilerServices.Hint.Assume(burstEnabled); 69 | 70 | if (burstEnabled) 71 | return functionPointer.Invoke(<#=GENERIC_ARGS#>); 72 | else 73 | return value; 74 | } 75 | 76 | [BurstDiscard] 77 | private void CheckBurst(<#=GENERIC_ARGS_TYPED#>) 78 | { 79 | burstEnabled = false; 80 | value = DelegateCache>.GetDelegate(functionPointer.Value).Invoke(<#=GENERIC_ARGS#>); 81 | } 82 | 83 | public static BurstFunc<#=GENERIC_DEF#> Compile(Func<#=GENERIC_DEF#> func) 84 | { 85 | var functionPointer = BurstCompiler.CompileFunctionPointer(func); 86 | DelegateCache>.SetDelegate(functionPointer.Value, func); 87 | return new BurstFunc<#=GENERIC_DEF#>(functionPointer); 88 | } 89 | 90 | public static implicit operator ValueFunc<#=GENERIC_DEF#>.Struct>(BurstFunc<#=GENERIC_DEF#> burstFunc) 91 | { 92 | return ValueFunc<#=GENERIC_DEF#>.New(burstFunc); 93 | } 94 | 95 | public static implicit operator BurstFunc<#=GENERIC_DEF#>(ValueFunc<#=GENERIC_DEF#>.Struct> valueFunc) 96 | { 97 | return valueFunc.lambda; 98 | } 99 | } 100 | 101 | <# 102 | } 103 | #> 104 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/BurstFunc.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6078a43151d51504493f33ae73bf89c2 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/CareBoo.Burst.Delegates.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CareBoo.Burst.Delegates", 3 | "references": [ 4 | "Unity.Burst" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": true, 9 | "overrideReferences": true, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/CareBoo.Burst.Delegates.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 909ff1cfa87ff534885900beab38544e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/DelegateCache.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CareBoo.Burst.Delegates 5 | { 6 | public static class DelegateCache where T : Delegate 7 | { 8 | private static Dictionary dict; 9 | private static Dictionary Dict => dict ??= new Dictionary(); 10 | 11 | public static T GetDelegate(IntPtr ptr) => Dict[ptr]; 12 | 13 | public static void SetDelegate(IntPtr ptr, T d) 14 | { 15 | Dict[ptr] = d; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/DelegateCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faffdb35a6a5aa34494bc6192bf2bc49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IAction.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | 17 | public interface IAction 18 | { 19 | void Invoke(); 20 | } 21 | 22 | 23 | public interface IAction 24 | { 25 | void Invoke(T arg0); 26 | } 27 | 28 | 29 | public interface IAction 30 | { 31 | void Invoke(T arg0, U arg1); 32 | } 33 | 34 | 35 | public interface IAction 36 | { 37 | void Invoke(T arg0, U arg1, V arg2); 38 | } 39 | 40 | 41 | public interface IAction 42 | { 43 | void Invoke(T arg0, U arg1, V arg2, W arg3); 44 | } 45 | 46 | 47 | public interface IAction 48 | { 49 | void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4); 50 | } 51 | 52 | 53 | public interface IAction 54 | { 55 | void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5); 56 | } 57 | 58 | 59 | public interface IAction 60 | { 61 | void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6); 62 | } 63 | 64 | 65 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IAction.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a9723e3693e4d4489690bee6fdabb4f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IAction.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | <# 17 | var GENERIC_PARAMS = new[] 18 | { 19 | "", 20 | "T", 21 | "U", 22 | "V", 23 | "W", 24 | "X", 25 | "Y", 26 | "Z" 27 | }; 28 | 29 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 30 | { 31 | var GENERIC_DEF = ""; 32 | for (var j = 1; j <= i; j++) 33 | { 34 | GENERIC_DEF += $"in {GENERIC_PARAMS[j]}, "; 35 | } 36 | 37 | GENERIC_DEF = i > 0 ? $"<{string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select(t => $"in {t}"))}>" : ""; 38 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 39 | 40 | #> 41 | public interface IAction<#=GENERIC_DEF#> 42 | { 43 | void Invoke(<#=GENERIC_ARGS_TYPED#>); 44 | } 45 | 46 | <# 47 | } 48 | #> 49 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IAction.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea6d71768123dc841aa6cbd910f62b44 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IFunc.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | 17 | public interface IFunc 18 | { 19 | TResult Invoke(); 20 | } 21 | 22 | 23 | public interface IFunc 24 | { 25 | TResult Invoke(T arg0); 26 | } 27 | 28 | 29 | public interface IFunc 30 | { 31 | TResult Invoke(T arg0, U arg1); 32 | } 33 | 34 | 35 | public interface IFunc 36 | { 37 | TResult Invoke(T arg0, U arg1, V arg2); 38 | } 39 | 40 | 41 | public interface IFunc 42 | { 43 | TResult Invoke(T arg0, U arg1, V arg2, W arg3); 44 | } 45 | 46 | 47 | public interface IFunc 48 | { 49 | TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4); 50 | } 51 | 52 | 53 | public interface IFunc 54 | { 55 | TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5); 56 | } 57 | 58 | 59 | public interface IFunc 60 | { 61 | TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6); 62 | } 63 | 64 | 65 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IFunc.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5832593623a2ae642a67cb236e9e2caa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IFunc.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | <# 17 | var GENERIC_PARAMS = new[] 18 | { 19 | "", 20 | "T", 21 | "U", 22 | "V", 23 | "W", 24 | "X", 25 | "Y", 26 | "Z" 27 | }; 28 | 29 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 30 | { 31 | var GENERIC_DEF = ""; 32 | for (var j = 1; j <= i; j++) 33 | { 34 | GENERIC_DEF += $"in {GENERIC_PARAMS[j]}, "; 35 | } 36 | 37 | GENERIC_DEF = $"<{GENERIC_DEF}out TResult>"; 38 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 39 | 40 | #> 41 | public interface IFunc<#=GENERIC_DEF#> 42 | { 43 | TResult Invoke(<#=GENERIC_ARGS_TYPED#>); 44 | } 45 | 46 | <# 47 | } 48 | #> 49 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/IFunc.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac343bad9b39fcf469f865bd55d12113 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueAction.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | 17 | public struct ValueAction 18 | { 19 | public struct Struct 20 | where TLambda : struct, IAction 21 | { 22 | internal readonly TLambda lambda; 23 | 24 | public void Invoke() 25 | { 26 | lambda.Invoke(); 27 | } 28 | 29 | internal Struct(TLambda lambda) 30 | { 31 | this.lambda = lambda; 32 | } 33 | } 34 | 35 | public static Struct New(TLambda lambda = default) 36 | where TLambda : struct, IAction 37 | { 38 | return new Struct(lambda); 39 | } 40 | } 41 | 42 | 43 | public struct ValueAction 44 | where T : struct 45 | { 46 | public struct Struct 47 | where TLambda : struct, IAction 48 | { 49 | internal readonly TLambda lambda; 50 | 51 | public void Invoke(T arg0) 52 | { 53 | lambda.Invoke(arg0); 54 | } 55 | 56 | internal Struct(TLambda lambda) 57 | { 58 | this.lambda = lambda; 59 | } 60 | } 61 | 62 | public static Struct New(TLambda lambda = default) 63 | where TLambda : struct, IAction 64 | { 65 | return new Struct(lambda); 66 | } 67 | } 68 | 69 | 70 | public struct ValueAction 71 | where T : struct 72 | where U : struct 73 | { 74 | public struct Struct 75 | where TLambda : struct, IAction 76 | { 77 | internal readonly TLambda lambda; 78 | 79 | public void Invoke(T arg0, U arg1) 80 | { 81 | lambda.Invoke(arg0, arg1); 82 | } 83 | 84 | internal Struct(TLambda lambda) 85 | { 86 | this.lambda = lambda; 87 | } 88 | } 89 | 90 | public static Struct New(TLambda lambda = default) 91 | where TLambda : struct, IAction 92 | { 93 | return new Struct(lambda); 94 | } 95 | } 96 | 97 | 98 | public struct ValueAction 99 | where T : struct 100 | where U : struct 101 | where V : struct 102 | { 103 | public struct Struct 104 | where TLambda : struct, IAction 105 | { 106 | internal readonly TLambda lambda; 107 | 108 | public void Invoke(T arg0, U arg1, V arg2) 109 | { 110 | lambda.Invoke(arg0, arg1, arg2); 111 | } 112 | 113 | internal Struct(TLambda lambda) 114 | { 115 | this.lambda = lambda; 116 | } 117 | } 118 | 119 | public static Struct New(TLambda lambda = default) 120 | where TLambda : struct, IAction 121 | { 122 | return new Struct(lambda); 123 | } 124 | } 125 | 126 | 127 | public struct ValueAction 128 | where T : struct 129 | where U : struct 130 | where V : struct 131 | where W : struct 132 | { 133 | public struct Struct 134 | where TLambda : struct, IAction 135 | { 136 | internal readonly TLambda lambda; 137 | 138 | public void Invoke(T arg0, U arg1, V arg2, W arg3) 139 | { 140 | lambda.Invoke(arg0, arg1, arg2, arg3); 141 | } 142 | 143 | internal Struct(TLambda lambda) 144 | { 145 | this.lambda = lambda; 146 | } 147 | } 148 | 149 | public static Struct New(TLambda lambda = default) 150 | where TLambda : struct, IAction 151 | { 152 | return new Struct(lambda); 153 | } 154 | } 155 | 156 | 157 | public struct ValueAction 158 | where T : struct 159 | where U : struct 160 | where V : struct 161 | where W : struct 162 | where X : struct 163 | { 164 | public struct Struct 165 | where TLambda : struct, IAction 166 | { 167 | internal readonly TLambda lambda; 168 | 169 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4) 170 | { 171 | lambda.Invoke(arg0, arg1, arg2, arg3, arg4); 172 | } 173 | 174 | internal Struct(TLambda lambda) 175 | { 176 | this.lambda = lambda; 177 | } 178 | } 179 | 180 | public static Struct New(TLambda lambda = default) 181 | where TLambda : struct, IAction 182 | { 183 | return new Struct(lambda); 184 | } 185 | } 186 | 187 | 188 | public struct ValueAction 189 | where T : struct 190 | where U : struct 191 | where V : struct 192 | where W : struct 193 | where X : struct 194 | where Y : struct 195 | { 196 | public struct Struct 197 | where TLambda : struct, IAction 198 | { 199 | internal readonly TLambda lambda; 200 | 201 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 202 | { 203 | lambda.Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 204 | } 205 | 206 | internal Struct(TLambda lambda) 207 | { 208 | this.lambda = lambda; 209 | } 210 | } 211 | 212 | public static Struct New(TLambda lambda = default) 213 | where TLambda : struct, IAction 214 | { 215 | return new Struct(lambda); 216 | } 217 | } 218 | 219 | 220 | public struct ValueAction 221 | where T : struct 222 | where U : struct 223 | where V : struct 224 | where W : struct 225 | where X : struct 226 | where Y : struct 227 | where Z : struct 228 | { 229 | public struct Struct 230 | where TLambda : struct, IAction 231 | { 232 | internal readonly TLambda lambda; 233 | 234 | public void Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 235 | { 236 | lambda.Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 237 | } 238 | 239 | internal Struct(TLambda lambda) 240 | { 241 | this.lambda = lambda; 242 | } 243 | } 244 | 245 | public static Struct New(TLambda lambda = default) 246 | where TLambda : struct, IAction 247 | { 248 | return new Struct(lambda); 249 | } 250 | } 251 | 252 | 253 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueAction.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ac7288aa0e47d84e896356f2bdde87b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueAction.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | <# 17 | var GENERIC_PARAMS = new[] 18 | { 19 | "", 20 | "T", 21 | "U", 22 | "V", 23 | "W", 24 | "X", 25 | "Y", 26 | "Z" 27 | }; 28 | 29 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 30 | { 31 | var GENERIC_CONSTRAINTS = ""; 32 | for (var j = 1; j <= i; j++) 33 | { 34 | GENERIC_CONSTRAINTS += $"\n where {GENERIC_PARAMS[j]} : struct"; 35 | } 36 | 37 | var GENERIC_DEF = i > 0 ? $"<{string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i))}>" : ""; 38 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 39 | var GENERIC_ARGS = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"arg{n}")); 40 | 41 | #> 42 | public struct ValueAction<#=GENERIC_DEF#><#=GENERIC_CONSTRAINTS#> 43 | { 44 | public struct Struct 45 | where TLambda : struct, IAction<#=GENERIC_DEF#> 46 | { 47 | internal readonly TLambda lambda; 48 | 49 | public void Invoke(<#=GENERIC_ARGS_TYPED#>) 50 | { 51 | lambda.Invoke(<#=GENERIC_ARGS#>); 52 | } 53 | 54 | internal Struct(TLambda lambda) 55 | { 56 | this.lambda = lambda; 57 | } 58 | } 59 | 60 | public static Struct New(TLambda lambda = default) 61 | where TLambda : struct, IAction<#=GENERIC_DEF#> 62 | { 63 | return new Struct(lambda); 64 | } 65 | } 66 | 67 | <# 68 | } 69 | #> 70 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueAction.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d01c6a601ab1387468c0e90204d45d39 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueFunc.gen.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | 17 | public struct ValueFunc 18 | where TResult : struct 19 | { 20 | public struct Struct 21 | where TLambda : struct, IFunc 22 | { 23 | internal readonly TLambda lambda; 24 | 25 | public TResult Invoke() 26 | { 27 | return lambda.Invoke(); 28 | } 29 | 30 | internal Struct(TLambda lambda) 31 | { 32 | this.lambda = lambda; 33 | } 34 | } 35 | 36 | public static Struct New(TLambda lambda = default) 37 | where TLambda : struct, IFunc 38 | { 39 | return new Struct(lambda); 40 | } 41 | } 42 | 43 | 44 | public struct ValueFunc 45 | where T : struct 46 | where TResult : struct 47 | { 48 | public struct Struct 49 | where TLambda : struct, IFunc 50 | { 51 | internal readonly TLambda lambda; 52 | 53 | public TResult Invoke(T arg0) 54 | { 55 | return lambda.Invoke(arg0); 56 | } 57 | 58 | internal Struct(TLambda lambda) 59 | { 60 | this.lambda = lambda; 61 | } 62 | } 63 | 64 | public static Struct New(TLambda lambda = default) 65 | where TLambda : struct, IFunc 66 | { 67 | return new Struct(lambda); 68 | } 69 | } 70 | 71 | 72 | public struct ValueFunc 73 | where T : struct 74 | where U : struct 75 | where TResult : struct 76 | { 77 | public struct Struct 78 | where TLambda : struct, IFunc 79 | { 80 | internal readonly TLambda lambda; 81 | 82 | public TResult Invoke(T arg0, U arg1) 83 | { 84 | return lambda.Invoke(arg0, arg1); 85 | } 86 | 87 | internal Struct(TLambda lambda) 88 | { 89 | this.lambda = lambda; 90 | } 91 | } 92 | 93 | public static Struct New(TLambda lambda = default) 94 | where TLambda : struct, IFunc 95 | { 96 | return new Struct(lambda); 97 | } 98 | } 99 | 100 | 101 | public struct ValueFunc 102 | where T : struct 103 | where U : struct 104 | where V : struct 105 | where TResult : struct 106 | { 107 | public struct Struct 108 | where TLambda : struct, IFunc 109 | { 110 | internal readonly TLambda lambda; 111 | 112 | public TResult Invoke(T arg0, U arg1, V arg2) 113 | { 114 | return lambda.Invoke(arg0, arg1, arg2); 115 | } 116 | 117 | internal Struct(TLambda lambda) 118 | { 119 | this.lambda = lambda; 120 | } 121 | } 122 | 123 | public static Struct New(TLambda lambda = default) 124 | where TLambda : struct, IFunc 125 | { 126 | return new Struct(lambda); 127 | } 128 | } 129 | 130 | 131 | public struct ValueFunc 132 | where T : struct 133 | where U : struct 134 | where V : struct 135 | where W : struct 136 | where TResult : struct 137 | { 138 | public struct Struct 139 | where TLambda : struct, IFunc 140 | { 141 | internal readonly TLambda lambda; 142 | 143 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3) 144 | { 145 | return lambda.Invoke(arg0, arg1, arg2, arg3); 146 | } 147 | 148 | internal Struct(TLambda lambda) 149 | { 150 | this.lambda = lambda; 151 | } 152 | } 153 | 154 | public static Struct New(TLambda lambda = default) 155 | where TLambda : struct, IFunc 156 | { 157 | return new Struct(lambda); 158 | } 159 | } 160 | 161 | 162 | public struct ValueFunc 163 | where T : struct 164 | where U : struct 165 | where V : struct 166 | where W : struct 167 | where X : struct 168 | where TResult : struct 169 | { 170 | public struct Struct 171 | where TLambda : struct, IFunc 172 | { 173 | internal readonly TLambda lambda; 174 | 175 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4) 176 | { 177 | return lambda.Invoke(arg0, arg1, arg2, arg3, arg4); 178 | } 179 | 180 | internal Struct(TLambda lambda) 181 | { 182 | this.lambda = lambda; 183 | } 184 | } 185 | 186 | public static Struct New(TLambda lambda = default) 187 | where TLambda : struct, IFunc 188 | { 189 | return new Struct(lambda); 190 | } 191 | } 192 | 193 | 194 | public struct ValueFunc 195 | where T : struct 196 | where U : struct 197 | where V : struct 198 | where W : struct 199 | where X : struct 200 | where Y : struct 201 | where TResult : struct 202 | { 203 | public struct Struct 204 | where TLambda : struct, IFunc 205 | { 206 | internal readonly TLambda lambda; 207 | 208 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5) 209 | { 210 | return lambda.Invoke(arg0, arg1, arg2, arg3, arg4, arg5); 211 | } 212 | 213 | internal Struct(TLambda lambda) 214 | { 215 | this.lambda = lambda; 216 | } 217 | } 218 | 219 | public static Struct New(TLambda lambda = default) 220 | where TLambda : struct, IFunc 221 | { 222 | return new Struct(lambda); 223 | } 224 | } 225 | 226 | 227 | public struct ValueFunc 228 | where T : struct 229 | where U : struct 230 | where V : struct 231 | where W : struct 232 | where X : struct 233 | where Y : struct 234 | where Z : struct 235 | where TResult : struct 236 | { 237 | public struct Struct 238 | where TLambda : struct, IFunc 239 | { 240 | internal readonly TLambda lambda; 241 | 242 | public TResult Invoke(T arg0, U arg1, V arg2, W arg3, X arg4, Y arg5, Z arg6) 243 | { 244 | return lambda.Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); 245 | } 246 | 247 | internal Struct(TLambda lambda) 248 | { 249 | this.lambda = lambda; 250 | } 251 | } 252 | 253 | public static Struct New(TLambda lambda = default) 254 | where TLambda : struct, IFunc 255 | { 256 | return new Struct(lambda); 257 | } 258 | } 259 | 260 | 261 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueFunc.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eff3611bc137a814284f28522e1e3f33 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueFunc.tt: -------------------------------------------------------------------------------- 1 | <#@ assembly name="System.Core" #> 2 | <#@ import namespace="System.Linq" #> 3 | <#@ output extension=".gen.cs" #> 4 | 5 | //------------------------------------------------------------------------------ 6 | // 7 | // This code was generated by a tool. 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | 14 | namespace CareBoo.Burst.Delegates 15 | { 16 | <# 17 | var GENERIC_PARAMS = new[] 18 | { 19 | "", 20 | "T", 21 | "U", 22 | "V", 23 | "W", 24 | "X", 25 | "Y", 26 | "Z" 27 | }; 28 | 29 | for (var i = 0; i < GENERIC_PARAMS.Length; i++) 30 | { 31 | var GENERIC_DEF = ""; 32 | var GENERIC_CONSTRAINTS = ""; 33 | for (var j = 1; j <= i; j++) 34 | { 35 | GENERIC_DEF += $"{GENERIC_PARAMS[j]}, "; 36 | GENERIC_CONSTRAINTS += $"where {GENERIC_PARAMS[j]} : struct\n "; 37 | } 38 | 39 | GENERIC_DEF = $"<{GENERIC_DEF}TResult>"; 40 | GENERIC_CONSTRAINTS += "where TResult : struct"; 41 | var GENERIC_ARGS_TYPED = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"{t} arg{n}")); 42 | var GENERIC_ARGS = string.Join(", ", GENERIC_PARAMS.Skip(1).Take(i).Select((t, n) => $"arg{n}")); 43 | 44 | #> 45 | public struct ValueFunc<#=GENERIC_DEF#> 46 | <#=GENERIC_CONSTRAINTS#> 47 | { 48 | public struct Struct 49 | where TLambda : struct, IFunc<#=GENERIC_DEF#> 50 | { 51 | internal readonly TLambda lambda; 52 | 53 | public TResult Invoke(<#=GENERIC_ARGS_TYPED#>) 54 | { 55 | return lambda.Invoke(<#=GENERIC_ARGS#>); 56 | } 57 | 58 | internal Struct(TLambda lambda) 59 | { 60 | this.lambda = lambda; 61 | } 62 | } 63 | 64 | public static Struct New(TLambda lambda = default) 65 | where TLambda : struct, IFunc<#=GENERIC_DEF#> 66 | { 67 | return new Struct(lambda); 68 | } 69 | } 70 | 71 | <# 72 | } 73 | #> 74 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/CareBoo.Burst.Delegates/ValueFunc.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d1c4c8a36d51044ca3b72bbd8e22566 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/README.md: -------------------------------------------------------------------------------- 1 | # Burst.Delegates 2 | 3 | A set of Burst-compatible struct APIs to use instead of C# delegates. 4 | 5 | ## Examples 6 | 7 | Here are a couple examples showcasing how to write struct-based delegates 8 | 9 | ### Creating Delegates 10 | 11 | C#: 12 | ```cs 13 | Func greaterThan = (int a, int b) => a > b; 14 | ``` 15 | 16 | Struct-based: 17 | ```cs 18 | public struct GreaterThanFunc : IFunc 19 | { 20 | public bool Invoke(int a, int b) => a > b; 21 | } 22 | 23 | var greaterThan = ValueFunc.New(); 24 | ``` 25 | 26 | ### Referencing Delegates 27 | 28 | C#: 29 | ```cs 30 | public class MyClass 31 | { 32 | public static List CompareNextVal(List vals, Func comparer) 33 | { 34 | // ... 35 | } 36 | } 37 | ``` 38 | 39 | Struct-based: 40 | ```cs 41 | public class MyClass 42 | { 43 | public static List CompareNextVal(List vals, ValueFunc.Struct comparer) 44 | { 45 | // ... 46 | } 47 | } 48 | ``` 49 | 50 | ### Usage in a Job 51 | 52 | ```cs 53 | public struct AggregateJob : IJob 54 | where TAggregator : struct, IFunc 55 | { 56 | public ValueFunc.Struct Aggregator; 57 | public NativeArray Input; 58 | public NativeArray Output; 59 | 60 | public void Execute() 61 | { 62 | for (var i = 0; i < Input.Length; i++) 63 | Output[0] = Aggregator.Invoke(Input[i], Output[0]); 64 | } 65 | } 66 | 67 | public class MyClass 68 | { 69 | struct SumFunc : IFunc 70 | { 71 | public int Invoke(int a, int b) => a + b; 72 | } 73 | 74 | public static int SumSomeNumbers(int[] numbers) 75 | { 76 | using(var input = new NativeArray(numbers, Allocator.Persistent)) 77 | using(var output = new NativeArray(1, Allocator.Persistent)) 78 | { 79 | var sum = ValueFunc.New(); 80 | var job = new AggregateJob { Aggregator = sum, Input = input, Output = output }; 81 | job.Run(); 82 | return output[0]; 83 | } 84 | } 85 | } 86 | ``` 87 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caf282e94701a6a4984d918488d73764 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.careboo.burst-delegates", 3 | "displayName": "Burst.Delegates", 4 | "version": "1.2.0", 5 | "unity": "2020.1", 6 | "description": "Burst supported delegates for functional-style jobs.\n\nIncludes:\n- Action and Func interface for defining APIs\n- ValueAction and ValueFunc for implementing IAction and IFunc interfaces with structs\n- BurstAction and BurstFunc which is a generic-supported wrapper around FunctionPointer", 7 | "dependencies": { 8 | "com.unity.burst": "1.5.0" 9 | }, 10 | "publishConfig": { 11 | "registry": "https://npm.pkg.github.com/@careboo" 12 | }, 13 | "repository": "https://github.com/CareBoo/Burst.Delegates", 14 | "type": "library" 15 | } -------------------------------------------------------------------------------- /Packages/com.careboo.burst-delegates/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45075cf6453a9ca40a63bf7e8a6d9a82 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.burst": "1.5.0", 4 | "com.unity.entities": "0.17.0-preview.41", 5 | "com.unity.ide.vscode": "1.2.3", 6 | "com.unity.package-validation-suite": "0.19.3-preview", 7 | "com.unity.settings-manager": "1.0.3", 8 | "com.unity.test-framework": "1.1.24", 9 | "com.unity.test-framework.performance": "2.8.0-preview", 10 | "com.unity.testtools.codecoverage": "1.0.0", 11 | "com.unity.upm.develop": "0.3.0", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.androidjni": "1.0.0", 14 | "com.unity.modules.animation": "1.0.0", 15 | "com.unity.modules.assetbundle": "1.0.0", 16 | "com.unity.modules.audio": "1.0.0", 17 | "com.unity.modules.cloth": "1.0.0", 18 | "com.unity.modules.director": "1.0.0", 19 | "com.unity.modules.imageconversion": "1.0.0", 20 | "com.unity.modules.imgui": "1.0.0", 21 | "com.unity.modules.jsonserialize": "1.0.0", 22 | "com.unity.modules.particlesystem": "1.0.0", 23 | "com.unity.modules.physics": "1.0.0", 24 | "com.unity.modules.physics2d": "1.0.0", 25 | "com.unity.modules.screencapture": "1.0.0", 26 | "com.unity.modules.terrain": "1.0.0", 27 | "com.unity.modules.terrainphysics": "1.0.0", 28 | "com.unity.modules.tilemap": "1.0.0", 29 | "com.unity.modules.ui": "1.0.0", 30 | "com.unity.modules.uielements": "1.0.0", 31 | "com.unity.modules.umbra": "1.0.0", 32 | "com.unity.modules.unityanalytics": "1.0.0", 33 | "com.unity.modules.unitywebrequest": "1.0.0", 34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 35 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 36 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 37 | "com.unity.modules.unitywebrequestwww": "1.0.0", 38 | "com.unity.modules.vehicles": "1.0.0", 39 | "com.unity.modules.video": "1.0.0", 40 | "com.unity.modules.vr": "1.0.0", 41 | "com.unity.modules.wind": "1.0.0", 42 | "com.unity.modules.xr": "1.0.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.careboo.burst-delegates": { 4 | "version": "file:com.careboo.burst-delegates", 5 | "depth": 0, 6 | "source": "embedded", 7 | "dependencies": { 8 | "com.unity.burst": "1.5.0" 9 | } 10 | }, 11 | "com.unity.burst": { 12 | "version": "1.5.0", 13 | "depth": 0, 14 | "source": "registry", 15 | "dependencies": { 16 | "com.unity.mathematics": "1.2.1" 17 | }, 18 | "url": "https://packages.unity.com" 19 | }, 20 | "com.unity.collections": { 21 | "version": "0.15.0-preview.21", 22 | "depth": 1, 23 | "source": "registry", 24 | "dependencies": { 25 | "com.unity.test-framework.performance": "2.3.1-preview", 26 | "com.unity.burst": "1.4.1" 27 | }, 28 | "url": "https://packages.unity.com" 29 | }, 30 | "com.unity.entities": { 31 | "version": "0.17.0-preview.41", 32 | "depth": 0, 33 | "source": "registry", 34 | "dependencies": { 35 | "com.unity.burst": "1.4.1", 36 | "com.unity.properties": "1.5.0-preview", 37 | "com.unity.serialization": "1.5.0-preview", 38 | "com.unity.collections": "0.15.0-preview.21", 39 | "com.unity.mathematics": "1.2.1", 40 | "com.unity.modules.assetbundle": "1.0.0", 41 | "com.unity.test-framework.performance": "2.3.1-preview", 42 | "com.unity.nuget.mono-cecil": "0.1.6-preview.2", 43 | "com.unity.jobs": "0.8.0-preview.23", 44 | "com.unity.scriptablebuildpipeline": "1.9.0", 45 | "com.unity.platforms": "0.10.0-preview.10" 46 | }, 47 | "url": "https://packages.unity.com" 48 | }, 49 | "com.unity.ext.nunit": { 50 | "version": "1.0.6", 51 | "depth": 1, 52 | "source": "registry", 53 | "dependencies": {}, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.ide.vscode": { 57 | "version": "1.2.3", 58 | "depth": 0, 59 | "source": "registry", 60 | "dependencies": {}, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.jobs": { 64 | "version": "0.8.0-preview.23", 65 | "depth": 1, 66 | "source": "registry", 67 | "dependencies": { 68 | "com.unity.collections": "0.15.0-preview.21", 69 | "com.unity.mathematics": "1.2.1" 70 | }, 71 | "url": "https://packages.unity.com" 72 | }, 73 | "com.unity.mathematics": { 74 | "version": "1.2.1", 75 | "depth": 1, 76 | "source": "registry", 77 | "dependencies": {}, 78 | "url": "https://packages.unity.com" 79 | }, 80 | "com.unity.nuget.mono-cecil": { 81 | "version": "0.1.6-preview.2", 82 | "depth": 1, 83 | "source": "registry", 84 | "dependencies": { 85 | "nuget.mono-cecil": "0.1.6-preview" 86 | }, 87 | "url": "https://packages.unity.com" 88 | }, 89 | "com.unity.package-validation-suite": { 90 | "version": "0.19.3-preview", 91 | "depth": 0, 92 | "source": "registry", 93 | "dependencies": { 94 | "com.unity.nuget.mono-cecil": "0.1.6-preview.2" 95 | }, 96 | "url": "https://packages.unity.com" 97 | }, 98 | "com.unity.platforms": { 99 | "version": "0.10.0-preview.10", 100 | "depth": 1, 101 | "source": "registry", 102 | "dependencies": { 103 | "com.unity.properties": "1.6.0-preview", 104 | "com.unity.properties.ui": "1.6.2-preview.1", 105 | "com.unity.scriptablebuildpipeline": "1.6.4-preview", 106 | "com.unity.serialization": "1.6.2-preview" 107 | }, 108 | "url": "https://packages.unity.com" 109 | }, 110 | "com.unity.properties": { 111 | "version": "1.6.0-preview", 112 | "depth": 2, 113 | "source": "registry", 114 | "dependencies": { 115 | "com.unity.nuget.mono-cecil": "0.1.6-preview.2", 116 | "com.unity.test-framework.performance": "2.3.1-preview" 117 | }, 118 | "url": "https://packages.unity.com" 119 | }, 120 | "com.unity.properties.ui": { 121 | "version": "1.6.2-preview.1", 122 | "depth": 2, 123 | "source": "registry", 124 | "dependencies": { 125 | "com.unity.properties": "1.6.0-preview", 126 | "com.unity.serialization": "1.6.1-preview", 127 | "com.unity.modules.uielements": "1.0.0" 128 | }, 129 | "url": "https://packages.unity.com" 130 | }, 131 | "com.unity.scriptablebuildpipeline": { 132 | "version": "1.15.2", 133 | "depth": 1, 134 | "source": "registry", 135 | "dependencies": {}, 136 | "url": "https://packages.unity.com" 137 | }, 138 | "com.unity.serialization": { 139 | "version": "1.6.2-preview", 140 | "depth": 2, 141 | "source": "registry", 142 | "dependencies": { 143 | "com.unity.collections": "0.12.0-preview.13", 144 | "com.unity.burst": "1.3.5", 145 | "com.unity.jobs": "0.5.0-preview.14", 146 | "com.unity.properties": "1.6.0-preview", 147 | "com.unity.test-framework.performance": "2.3.1-preview" 148 | }, 149 | "url": "https://packages.unity.com" 150 | }, 151 | "com.unity.settings-manager": { 152 | "version": "1.0.3", 153 | "depth": 0, 154 | "source": "registry", 155 | "dependencies": {}, 156 | "url": "https://packages.unity.com" 157 | }, 158 | "com.unity.test-framework": { 159 | "version": "1.1.24", 160 | "depth": 0, 161 | "source": "registry", 162 | "dependencies": { 163 | "com.unity.ext.nunit": "1.0.6", 164 | "com.unity.modules.imgui": "1.0.0", 165 | "com.unity.modules.jsonserialize": "1.0.0" 166 | }, 167 | "url": "https://packages.unity.com" 168 | }, 169 | "com.unity.test-framework.performance": { 170 | "version": "2.8.0-preview", 171 | "depth": 0, 172 | "source": "registry", 173 | "dependencies": { 174 | "com.unity.test-framework": "1.1.0", 175 | "com.unity.modules.jsonserialize": "1.0.0" 176 | }, 177 | "url": "https://packages.unity.com" 178 | }, 179 | "com.unity.testtools.codecoverage": { 180 | "version": "1.0.0", 181 | "depth": 0, 182 | "source": "registry", 183 | "dependencies": { 184 | "com.unity.test-framework": "1.0.16", 185 | "com.unity.settings-manager": "1.0.1" 186 | }, 187 | "url": "https://packages.unity.com" 188 | }, 189 | "com.unity.upm.develop": { 190 | "version": "0.3.0", 191 | "depth": 0, 192 | "source": "registry", 193 | "dependencies": { 194 | "com.unity.test-framework": "1.1.18", 195 | "com.unity.package-validation-suite": "0.17.0-preview" 196 | }, 197 | "url": "https://packages.unity.com" 198 | }, 199 | "nuget.mono-cecil": { 200 | "version": "0.1.6-preview", 201 | "depth": 2, 202 | "source": "registry", 203 | "dependencies": {}, 204 | "url": "https://packages.unity.com" 205 | }, 206 | "com.unity.modules.ai": { 207 | "version": "1.0.0", 208 | "depth": 0, 209 | "source": "builtin", 210 | "dependencies": {} 211 | }, 212 | "com.unity.modules.androidjni": { 213 | "version": "1.0.0", 214 | "depth": 0, 215 | "source": "builtin", 216 | "dependencies": {} 217 | }, 218 | "com.unity.modules.animation": { 219 | "version": "1.0.0", 220 | "depth": 0, 221 | "source": "builtin", 222 | "dependencies": {} 223 | }, 224 | "com.unity.modules.assetbundle": { 225 | "version": "1.0.0", 226 | "depth": 0, 227 | "source": "builtin", 228 | "dependencies": {} 229 | }, 230 | "com.unity.modules.audio": { 231 | "version": "1.0.0", 232 | "depth": 0, 233 | "source": "builtin", 234 | "dependencies": {} 235 | }, 236 | "com.unity.modules.cloth": { 237 | "version": "1.0.0", 238 | "depth": 0, 239 | "source": "builtin", 240 | "dependencies": { 241 | "com.unity.modules.physics": "1.0.0" 242 | } 243 | }, 244 | "com.unity.modules.director": { 245 | "version": "1.0.0", 246 | "depth": 0, 247 | "source": "builtin", 248 | "dependencies": { 249 | "com.unity.modules.audio": "1.0.0", 250 | "com.unity.modules.animation": "1.0.0" 251 | } 252 | }, 253 | "com.unity.modules.imageconversion": { 254 | "version": "1.0.0", 255 | "depth": 0, 256 | "source": "builtin", 257 | "dependencies": {} 258 | }, 259 | "com.unity.modules.imgui": { 260 | "version": "1.0.0", 261 | "depth": 0, 262 | "source": "builtin", 263 | "dependencies": {} 264 | }, 265 | "com.unity.modules.jsonserialize": { 266 | "version": "1.0.0", 267 | "depth": 0, 268 | "source": "builtin", 269 | "dependencies": {} 270 | }, 271 | "com.unity.modules.particlesystem": { 272 | "version": "1.0.0", 273 | "depth": 0, 274 | "source": "builtin", 275 | "dependencies": {} 276 | }, 277 | "com.unity.modules.physics": { 278 | "version": "1.0.0", 279 | "depth": 0, 280 | "source": "builtin", 281 | "dependencies": {} 282 | }, 283 | "com.unity.modules.physics2d": { 284 | "version": "1.0.0", 285 | "depth": 0, 286 | "source": "builtin", 287 | "dependencies": {} 288 | }, 289 | "com.unity.modules.screencapture": { 290 | "version": "1.0.0", 291 | "depth": 0, 292 | "source": "builtin", 293 | "dependencies": { 294 | "com.unity.modules.imageconversion": "1.0.0" 295 | } 296 | }, 297 | "com.unity.modules.subsystems": { 298 | "version": "1.0.0", 299 | "depth": 1, 300 | "source": "builtin", 301 | "dependencies": { 302 | "com.unity.modules.jsonserialize": "1.0.0" 303 | } 304 | }, 305 | "com.unity.modules.terrain": { 306 | "version": "1.0.0", 307 | "depth": 0, 308 | "source": "builtin", 309 | "dependencies": {} 310 | }, 311 | "com.unity.modules.terrainphysics": { 312 | "version": "1.0.0", 313 | "depth": 0, 314 | "source": "builtin", 315 | "dependencies": { 316 | "com.unity.modules.physics": "1.0.0", 317 | "com.unity.modules.terrain": "1.0.0" 318 | } 319 | }, 320 | "com.unity.modules.tilemap": { 321 | "version": "1.0.0", 322 | "depth": 0, 323 | "source": "builtin", 324 | "dependencies": { 325 | "com.unity.modules.physics2d": "1.0.0" 326 | } 327 | }, 328 | "com.unity.modules.ui": { 329 | "version": "1.0.0", 330 | "depth": 0, 331 | "source": "builtin", 332 | "dependencies": {} 333 | }, 334 | "com.unity.modules.uielements": { 335 | "version": "1.0.0", 336 | "depth": 0, 337 | "source": "builtin", 338 | "dependencies": { 339 | "com.unity.modules.ui": "1.0.0", 340 | "com.unity.modules.imgui": "1.0.0", 341 | "com.unity.modules.jsonserialize": "1.0.0", 342 | "com.unity.modules.uielementsnative": "1.0.0" 343 | } 344 | }, 345 | "com.unity.modules.uielementsnative": { 346 | "version": "1.0.0", 347 | "depth": 1, 348 | "source": "builtin", 349 | "dependencies": { 350 | "com.unity.modules.ui": "1.0.0", 351 | "com.unity.modules.imgui": "1.0.0", 352 | "com.unity.modules.jsonserialize": "1.0.0" 353 | } 354 | }, 355 | "com.unity.modules.umbra": { 356 | "version": "1.0.0", 357 | "depth": 0, 358 | "source": "builtin", 359 | "dependencies": {} 360 | }, 361 | "com.unity.modules.unityanalytics": { 362 | "version": "1.0.0", 363 | "depth": 0, 364 | "source": "builtin", 365 | "dependencies": { 366 | "com.unity.modules.unitywebrequest": "1.0.0", 367 | "com.unity.modules.jsonserialize": "1.0.0" 368 | } 369 | }, 370 | "com.unity.modules.unitywebrequest": { 371 | "version": "1.0.0", 372 | "depth": 0, 373 | "source": "builtin", 374 | "dependencies": {} 375 | }, 376 | "com.unity.modules.unitywebrequestassetbundle": { 377 | "version": "1.0.0", 378 | "depth": 0, 379 | "source": "builtin", 380 | "dependencies": { 381 | "com.unity.modules.assetbundle": "1.0.0", 382 | "com.unity.modules.unitywebrequest": "1.0.0" 383 | } 384 | }, 385 | "com.unity.modules.unitywebrequestaudio": { 386 | "version": "1.0.0", 387 | "depth": 0, 388 | "source": "builtin", 389 | "dependencies": { 390 | "com.unity.modules.unitywebrequest": "1.0.0", 391 | "com.unity.modules.audio": "1.0.0" 392 | } 393 | }, 394 | "com.unity.modules.unitywebrequesttexture": { 395 | "version": "1.0.0", 396 | "depth": 0, 397 | "source": "builtin", 398 | "dependencies": { 399 | "com.unity.modules.unitywebrequest": "1.0.0", 400 | "com.unity.modules.imageconversion": "1.0.0" 401 | } 402 | }, 403 | "com.unity.modules.unitywebrequestwww": { 404 | "version": "1.0.0", 405 | "depth": 0, 406 | "source": "builtin", 407 | "dependencies": { 408 | "com.unity.modules.unitywebrequest": "1.0.0", 409 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 410 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 411 | "com.unity.modules.audio": "1.0.0", 412 | "com.unity.modules.assetbundle": "1.0.0", 413 | "com.unity.modules.imageconversion": "1.0.0" 414 | } 415 | }, 416 | "com.unity.modules.vehicles": { 417 | "version": "1.0.0", 418 | "depth": 0, 419 | "source": "builtin", 420 | "dependencies": { 421 | "com.unity.modules.physics": "1.0.0" 422 | } 423 | }, 424 | "com.unity.modules.video": { 425 | "version": "1.0.0", 426 | "depth": 0, 427 | "source": "builtin", 428 | "dependencies": { 429 | "com.unity.modules.audio": "1.0.0", 430 | "com.unity.modules.ui": "1.0.0", 431 | "com.unity.modules.unitywebrequest": "1.0.0" 432 | } 433 | }, 434 | "com.unity.modules.vr": { 435 | "version": "1.0.0", 436 | "depth": 0, 437 | "source": "builtin", 438 | "dependencies": { 439 | "com.unity.modules.jsonserialize": "1.0.0", 440 | "com.unity.modules.physics": "1.0.0", 441 | "com.unity.modules.xr": "1.0.0" 442 | } 443 | }, 444 | "com.unity.modules.wind": { 445 | "version": "1.0.0", 446 | "depth": 0, 447 | "source": "builtin", 448 | "dependencies": {} 449 | }, 450 | "com.unity.modules.xr": { 451 | "version": "1.0.0", 452 | "depth": 0, 453 | "source": "builtin", 454 | "dependencies": { 455 | "com.unity.modules.physics": "1.0.0", 456 | "com.unity.modules.jsonserialize": "1.0.0", 457 | "com.unity.modules.subsystems": "1.0.0" 458 | } 459 | } 460 | } 461 | } 462 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/BurstAotSettings_Android.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "CpuMinTargetX32": 0, 9 | "CpuMaxTargetX32": 0, 10 | "CpuMinTargetX64": 0, 11 | "CpuMaxTargetX64": 0 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "UsePlatformSDKLinker": false, 9 | "CpuMinTargetX32": 0, 10 | "CpuMaxTargetX32": 0, 11 | "CpuMinTargetX64": 0, 12 | "CpuMaxTargetX64": 0, 13 | "CpuTargetsX32": 6, 14 | "CpuTargetsX64": 72 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/CommonBurstAotSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "DisabledWarnings": "" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_LogWhenShaderIsCompiled: 0 64 | m_AllowEnlightenSupportForUpgradedProject: 0 65 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 1 16 | m_EnablePackageDependencies: 1 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 1 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 20 7 | productGUID: e8d36b92a52892e449349b46ffa0459c 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: UPMTemplate 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 0 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 1 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 0 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 1 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 1048576 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 30 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: {} 173 | buildNumber: {} 174 | AndroidBundleVersionCode: 1 175 | AndroidMinSdkVersion: 19 176 | AndroidTargetSdkVersion: 0 177 | AndroidPreferredInstallLocation: 1 178 | aotOptions: 179 | stripEngineCode: 1 180 | iPhoneStrippingLevel: 0 181 | iPhoneScriptCallOptimization: 0 182 | ForceInternetPermission: 0 183 | ForceSDCardPermission: 0 184 | CreateWallpaper: 0 185 | APKExpansionFiles: 0 186 | keepLoadedShadersAlive: 0 187 | StripUnusedMeshComponents: 0 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSTargetOSVersionString: 11.0 191 | tvOSSdkVersion: 0 192 | tvOSRequireExtendedGameController: 0 193 | tvOSTargetOSVersionString: 11.0 194 | uIPrerenderedIcon: 0 195 | uIRequiresPersistentWiFi: 0 196 | uIRequiresFullScreen: 1 197 | uIStatusBarHidden: 1 198 | uIExitOnSuspend: 0 199 | uIStatusBarStyle: 0 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 100 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 0 236 | iosCopyPluginsCodeInsteadOfSymlink: 0 237 | appleDeveloperTeamID: 238 | iOSManualSigningProvisioningProfileID: 239 | tvOSManualSigningProvisioningProfileID: 240 | iOSManualSigningProvisioningProfileType: 0 241 | tvOSManualSigningProvisioningProfileType: 0 242 | appleEnableAutomaticSigning: 0 243 | iOSRequireARKit: 0 244 | iOSAutomaticallyDetectAndAddCapabilities: 1 245 | appleEnableProMotion: 0 246 | clonedFromGUID: 00000000000000000000000000000000 247 | templatePackageId: 248 | templateDefaultScene: 249 | AndroidTargetArchitectures: 1 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | AndroidMinifyWithR8: 0 267 | AndroidMinifyRelease: 0 268 | AndroidMinifyDebug: 0 269 | AndroidValidateAppBundleSize: 1 270 | AndroidAppBundleSizeToValidate: 150 271 | m_BuildTargetIcons: [] 272 | m_BuildTargetPlatformIcons: [] 273 | m_BuildTargetBatching: [] 274 | m_BuildTargetGraphicsJobs: [] 275 | m_BuildTargetGraphicsJobMode: [] 276 | m_BuildTargetGraphicsAPIs: [] 277 | m_BuildTargetVRSettings: [] 278 | openGLRequireES31: 0 279 | openGLRequireES31AEP: 0 280 | openGLRequireES32: 0 281 | m_TemplateCustomTags: {} 282 | mobileMTRendering: 283 | Android: 1 284 | iPhone: 1 285 | tvOS: 1 286 | m_BuildTargetGroupLightmapEncodingQuality: [] 287 | m_BuildTargetGroupLightmapSettings: [] 288 | playModeTestRunnerEnabled: 0 289 | runPlayModeTestAsEditModeTest: 0 290 | actionOnDotNetUnhandledException: 1 291 | enableInternalProfiler: 0 292 | logObjCUncaughtExceptions: 1 293 | enableCrashReportAPI: 0 294 | cameraUsageDescription: 295 | locationUsageDescription: 296 | microphoneUsageDescription: 297 | switchNMETAOverride: 298 | switchNetLibKey: 299 | switchSocketMemoryPoolSize: 6144 300 | switchSocketAllocatorPoolSize: 128 301 | switchSocketConcurrencyLimit: 14 302 | switchScreenResolutionBehavior: 2 303 | switchUseCPUProfiler: 0 304 | switchUseGOLDLinker: 0 305 | switchApplicationID: 0x01004b9000490000 306 | switchNSODependencies: 307 | switchTitleNames_0: 308 | switchTitleNames_1: 309 | switchTitleNames_2: 310 | switchTitleNames_3: 311 | switchTitleNames_4: 312 | switchTitleNames_5: 313 | switchTitleNames_6: 314 | switchTitleNames_7: 315 | switchTitleNames_8: 316 | switchTitleNames_9: 317 | switchTitleNames_10: 318 | switchTitleNames_11: 319 | switchTitleNames_12: 320 | switchTitleNames_13: 321 | switchTitleNames_14: 322 | switchPublisherNames_0: 323 | switchPublisherNames_1: 324 | switchPublisherNames_2: 325 | switchPublisherNames_3: 326 | switchPublisherNames_4: 327 | switchPublisherNames_5: 328 | switchPublisherNames_6: 329 | switchPublisherNames_7: 330 | switchPublisherNames_8: 331 | switchPublisherNames_9: 332 | switchPublisherNames_10: 333 | switchPublisherNames_11: 334 | switchPublisherNames_12: 335 | switchPublisherNames_13: 336 | switchPublisherNames_14: 337 | switchIcons_0: {fileID: 0} 338 | switchIcons_1: {fileID: 0} 339 | switchIcons_2: {fileID: 0} 340 | switchIcons_3: {fileID: 0} 341 | switchIcons_4: {fileID: 0} 342 | switchIcons_5: {fileID: 0} 343 | switchIcons_6: {fileID: 0} 344 | switchIcons_7: {fileID: 0} 345 | switchIcons_8: {fileID: 0} 346 | switchIcons_9: {fileID: 0} 347 | switchIcons_10: {fileID: 0} 348 | switchIcons_11: {fileID: 0} 349 | switchIcons_12: {fileID: 0} 350 | switchIcons_13: {fileID: 0} 351 | switchIcons_14: {fileID: 0} 352 | switchSmallIcons_0: {fileID: 0} 353 | switchSmallIcons_1: {fileID: 0} 354 | switchSmallIcons_2: {fileID: 0} 355 | switchSmallIcons_3: {fileID: 0} 356 | switchSmallIcons_4: {fileID: 0} 357 | switchSmallIcons_5: {fileID: 0} 358 | switchSmallIcons_6: {fileID: 0} 359 | switchSmallIcons_7: {fileID: 0} 360 | switchSmallIcons_8: {fileID: 0} 361 | switchSmallIcons_9: {fileID: 0} 362 | switchSmallIcons_10: {fileID: 0} 363 | switchSmallIcons_11: {fileID: 0} 364 | switchSmallIcons_12: {fileID: 0} 365 | switchSmallIcons_13: {fileID: 0} 366 | switchSmallIcons_14: {fileID: 0} 367 | switchManualHTML: 368 | switchAccessibleURLs: 369 | switchLegalInformation: 370 | switchMainThreadStackSize: 1048576 371 | switchPresenceGroupId: 372 | switchLogoHandling: 0 373 | switchReleaseVersion: 0 374 | switchDisplayVersion: 1.0.0 375 | switchStartupUserAccount: 0 376 | switchTouchScreenUsage: 0 377 | switchSupportedLanguagesMask: 0 378 | switchLogoType: 0 379 | switchApplicationErrorCodeCategory: 380 | switchUserAccountSaveDataSize: 0 381 | switchUserAccountSaveDataJournalSize: 0 382 | switchApplicationAttribute: 0 383 | switchCardSpecSize: -1 384 | switchCardSpecClock: -1 385 | switchRatingsMask: 0 386 | switchRatingsInt_0: 0 387 | switchRatingsInt_1: 0 388 | switchRatingsInt_2: 0 389 | switchRatingsInt_3: 0 390 | switchRatingsInt_4: 0 391 | switchRatingsInt_5: 0 392 | switchRatingsInt_6: 0 393 | switchRatingsInt_7: 0 394 | switchRatingsInt_8: 0 395 | switchRatingsInt_9: 0 396 | switchRatingsInt_10: 0 397 | switchRatingsInt_11: 0 398 | switchRatingsInt_12: 0 399 | switchLocalCommunicationIds_0: 400 | switchLocalCommunicationIds_1: 401 | switchLocalCommunicationIds_2: 402 | switchLocalCommunicationIds_3: 403 | switchLocalCommunicationIds_4: 404 | switchLocalCommunicationIds_5: 405 | switchLocalCommunicationIds_6: 406 | switchLocalCommunicationIds_7: 407 | switchParentalControl: 0 408 | switchAllowsScreenshot: 1 409 | switchAllowsVideoCapturing: 1 410 | switchAllowsRuntimeAddOnContentInstall: 0 411 | switchDataLossConfirmation: 0 412 | switchUserAccountLockEnabled: 0 413 | switchSystemResourceMemory: 16777216 414 | switchSupportedNpadStyles: 22 415 | switchNativeFsCacheSize: 32 416 | switchIsHoldTypeHorizontal: 0 417 | switchSupportedNpadCount: 8 418 | switchSocketConfigEnabled: 0 419 | switchTcpInitialSendBufferSize: 32 420 | switchTcpInitialReceiveBufferSize: 64 421 | switchTcpAutoSendBufferSizeMax: 256 422 | switchTcpAutoReceiveBufferSizeMax: 256 423 | switchUdpSendBufferSize: 9 424 | switchUdpReceiveBufferSize: 42 425 | switchSocketBufferEfficiency: 4 426 | switchSocketInitializeEnabled: 1 427 | switchNetworkInterfaceManagerInitializeEnabled: 1 428 | switchPlayerConnectionEnabled: 1 429 | ps4NPAgeRating: 12 430 | ps4NPTitleSecret: 431 | ps4NPTrophyPackPath: 432 | ps4ParentalLevel: 11 433 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 434 | ps4Category: 0 435 | ps4MasterVersion: 01.00 436 | ps4AppVersion: 01.00 437 | ps4AppType: 0 438 | ps4ParamSfxPath: 439 | ps4VideoOutPixelFormat: 0 440 | ps4VideoOutInitialWidth: 1920 441 | ps4VideoOutBaseModeInitialWidth: 1920 442 | ps4VideoOutReprojectionRate: 60 443 | ps4PronunciationXMLPath: 444 | ps4PronunciationSIGPath: 445 | ps4BackgroundImagePath: 446 | ps4StartupImagePath: 447 | ps4StartupImagesFolder: 448 | ps4IconImagesFolder: 449 | ps4SaveDataImagePath: 450 | ps4SdkOverride: 451 | ps4BGMPath: 452 | ps4ShareFilePath: 453 | ps4ShareOverlayImagePath: 454 | ps4PrivacyGuardImagePath: 455 | ps4ExtraSceSysFile: 456 | ps4NPtitleDatPath: 457 | ps4RemotePlayKeyAssignment: -1 458 | ps4RemotePlayKeyMappingDir: 459 | ps4PlayTogetherPlayerCount: 0 460 | ps4EnterButtonAssignment: 2 461 | ps4ApplicationParam1: 0 462 | ps4ApplicationParam2: 0 463 | ps4ApplicationParam3: 0 464 | ps4ApplicationParam4: 0 465 | ps4DownloadDataSize: 0 466 | ps4GarlicHeapSize: 2048 467 | ps4ProGarlicHeapSize: 2560 468 | playerPrefsMaxSize: 32768 469 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 470 | ps4pnSessions: 1 471 | ps4pnPresence: 1 472 | ps4pnFriends: 1 473 | ps4pnGameCustomData: 1 474 | playerPrefsSupport: 0 475 | enableApplicationExit: 0 476 | resetTempFolder: 1 477 | restrictedAudioUsageRights: 0 478 | ps4UseResolutionFallback: 0 479 | ps4ReprojectionSupport: 0 480 | ps4UseAudio3dBackend: 0 481 | ps4UseLowGarlicFragmentationMode: 1 482 | ps4SocialScreenEnabled: 0 483 | ps4ScriptOptimizationLevel: 2 484 | ps4Audio3dVirtualSpeakerCount: 14 485 | ps4attribCpuUsage: 0 486 | ps4PatchPkgPath: 487 | ps4PatchLatestPkgPath: 488 | ps4PatchChangeinfoPath: 489 | ps4PatchDayOne: 0 490 | ps4attribUserManagement: 0 491 | ps4attribMoveSupport: 0 492 | ps4attrib3DSupport: 0 493 | ps4attribShareSupport: 0 494 | ps4attribExclusiveVR: 0 495 | ps4disableAutoHideSplash: 0 496 | ps4videoRecordingFeaturesUsed: 0 497 | ps4contentSearchFeaturesUsed: 0 498 | ps4CompatibilityPS5: 0 499 | ps4GPU800MHz: 1 500 | ps4attribEyeToEyeDistanceSettingVR: 0 501 | ps4IncludedModules: [] 502 | ps4attribVROutputEnabled: 0 503 | monoEnv: 504 | splashScreenBackgroundSourceLandscape: {fileID: 0} 505 | splashScreenBackgroundSourcePortrait: {fileID: 0} 506 | blurSplashScreenBackground: 1 507 | spritePackerPolicy: 508 | webGLMemorySize: 32 509 | webGLExceptionSupport: 1 510 | webGLNameFilesAsHashes: 0 511 | webGLDataCaching: 1 512 | webGLDebugSymbols: 0 513 | webGLEmscriptenArgs: 514 | webGLModulesDirectory: 515 | webGLTemplate: APPLICATION:Default 516 | webGLAnalyzeBuildSize: 0 517 | webGLUseEmbeddedResources: 0 518 | webGLCompressionFormat: 0 519 | webGLWasmArithmeticExceptions: 0 520 | webGLLinkerTarget: 1 521 | webGLThreadsSupport: 0 522 | webGLDecompressionFallback: 0 523 | scriptingDefineSymbols: {} 524 | platformArchitecture: {} 525 | scriptingBackend: {} 526 | il2cppCompilerConfiguration: {} 527 | managedStrippingLevel: {} 528 | incrementalIl2cppBuild: {} 529 | suppressCommonWarnings: 1 530 | allowUnsafeCode: 0 531 | useDeterministicCompilation: 1 532 | additionalIl2CppArgs: 533 | scriptingRuntimeVersion: 1 534 | gcIncremental: 0 535 | gcWBarrierValidation: 0 536 | apiCompatibilityLevelPerPlatform: {} 537 | m_RenderingPath: 1 538 | m_MobileRenderingPath: 1 539 | metroPackageName: UPMTemplate 540 | metroPackageVersion: 541 | metroCertificatePath: 542 | metroCertificatePassword: 543 | metroCertificateSubject: 544 | metroCertificateIssuer: 545 | metroCertificateNotAfter: 0000000000000000 546 | metroApplicationDescription: UPMTemplate 547 | wsaImages: {} 548 | metroTileShortName: 549 | metroTileShowName: 0 550 | metroMediumTileShowName: 0 551 | metroLargeTileShowName: 0 552 | metroWideTileShowName: 0 553 | metroSupportStreamingInstall: 0 554 | metroLastRequiredScene: 0 555 | metroDefaultTileSize: 1 556 | metroTileForegroundText: 2 557 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 558 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 559 | a: 1} 560 | metroSplashScreenUseBackgroundColor: 0 561 | platformCapabilities: {} 562 | metroTargetDeviceFamilies: {} 563 | metroFTAName: 564 | metroFTAFileTypes: [] 565 | metroProtocolName: 566 | XboxOneProductId: 567 | XboxOneUpdateKey: 568 | XboxOneSandboxId: 569 | XboxOneContentId: 570 | XboxOneTitleId: 571 | XboxOneSCId: 572 | XboxOneGameOsOverridePath: 573 | XboxOnePackagingOverridePath: 574 | XboxOneAppManifestOverridePath: 575 | XboxOneVersion: 1.0.0.0 576 | XboxOnePackageEncryption: 0 577 | XboxOnePackageUpdateGranularity: 2 578 | XboxOneDescription: 579 | XboxOneLanguage: 580 | - enus 581 | XboxOneCapability: [] 582 | XboxOneGameRating: {} 583 | XboxOneIsContentPackage: 0 584 | XboxOneEnableGPUVariability: 1 585 | XboxOneSockets: {} 586 | XboxOneSplashScreen: {fileID: 0} 587 | XboxOneAllowedProductIds: [] 588 | XboxOnePersistentLocalStorageSize: 0 589 | XboxOneXTitleMemory: 8 590 | XboxOneOverrideIdentityName: 591 | XboxOneOverrideIdentityPublisher: 592 | vrEditorSettings: 593 | daydream: 594 | daydreamIconForeground: {fileID: 0} 595 | daydreamIconBackground: {fileID: 0} 596 | cloudServicesEnabled: {} 597 | luminIcon: 598 | m_Name: 599 | m_ModelFolderPath: 600 | m_PortalFolderPath: 601 | luminCert: 602 | m_CertPath: 603 | m_SignPackage: 1 604 | luminIsChannelApp: 0 605 | luminVersion: 606 | m_VersionCode: 1 607 | m_VersionName: 608 | apiCompatibilityLevel: 6 609 | cloudProjectId: 610 | framebufferDepthMemorylessMode: 0 611 | projectName: 612 | organizationId: 613 | cloudEnabled: 0 614 | enableNativePlatformBackendsForNewInputSystem: 0 615 | disableOldInputManagerSupport: 0 616 | legacyClampBlendShapeWeights: 0 617 | virtualTexturingSupportEnabled: 0 618 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.1.1f1 2 | m_EditorVersionWithRevision: 2021.1.1f1 (6fdc41dfa55a) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo Switch: 5 229 | PS4: 5 230 | Stadia: 5 231 | Standalone: 5 232 | WebGL: 3 233 | Windows Store Apps: 5 234 | XboxOne: 5 235 | iPhone: 2 236 | tvOS: 2 237 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Burst.Delegates 2 | 3 | A set of Burst-compatible struct APIs to use instead of C# delegates. 4 | 5 | ## Examples 6 | 7 | Here are a couple examples showcasing how to write struct-based delegates 8 | 9 | ### Creating Delegates 10 | 11 | Delegate: 12 | ```cs 13 | Func greaterThan = (int a, int b) => a > b; 14 | ``` 15 | 16 | Value Delegate: 17 | ```cs 18 | public struct GreaterThanFunc : IFunc 19 | { 20 | public bool Invoke(int a, int b) => a > b; 21 | } 22 | 23 | var greaterThan = ValueFunc.New(); 24 | ``` 25 | 26 | Burst Delegate: 27 | ```cs 28 | [BurstCompile] 29 | public static bool GreaterThan(int a, int b) => a > b; 30 | 31 | BurstFunc greaterThan = BurstFunc.Compile(GreaterThan); 32 | ``` 33 | 34 | ### Referencing Delegates 35 | 36 | System.Delegate: 37 | ```cs 38 | public class MyClass 39 | { 40 | public static List CompareNextVal(List vals, Func comparer) 41 | { 42 | // ... 43 | } 44 | } 45 | ``` 46 | 47 | Value Delegate: 48 | ```cs 49 | public class MyClass 50 | { 51 | public static List CompareNextVal(List vals, ValueFunc.Struct comparer) 52 | { 53 | // ... 54 | } 55 | } 56 | ``` 57 | 58 | Burst Delegate: 59 | ```cs 60 | public class MyClass 61 | { 62 | public static List CompareNextVal(List vals, BurstFunc comparer) 63 | { 64 | // ... 65 | } 66 | } 67 | ``` 68 | 69 | ### Usage in a Job 70 | 71 | ```cs 72 | public struct AggregateJob : IJob 73 | where TAggregator : struct, IFunc 74 | { 75 | public ValueFunc.Struct Aggregator; 76 | public NativeArray Input; 77 | public NativeArray Output; 78 | 79 | public void Execute() 80 | { 81 | for (var i = 0; i < Input.Length; i++) 82 | Output[0] = Aggregator.Invoke(Input[i], Output[0]); 83 | } 84 | } 85 | 86 | [BurstCompile] 87 | public class MyClass 88 | { 89 | [BurstCompile] 90 | public static int Sum(int a, int b) => a + b; 91 | 92 | public static readonly BurstFunc SumFunc = BurstFunc.Compile(Sum); 93 | 94 | public static int SumSomeNumbers(int[] numbers) 95 | { 96 | using(var input = new NativeArray(numbers, Allocator.Persistent)) 97 | using(var output = new NativeArray(1, Allocator.Persistent)) 98 | { 99 | var job = new AggregateJob> 100 | { 101 | Aggregator = SumFunc, // BurstFunc has an implicit operator to ValueFunc 102 | Input = input, 103 | Output = output 104 | }; 105 | job.Run(); 106 | return output[0]; 107 | } 108 | } 109 | } 110 | ``` 111 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | vcSharedLogLevel: 9 | value: 0d5e400f0650 10 | flags: 0 11 | m_VCAutomaticAdd: 1 12 | m_VCDebugCom: 0 13 | m_VCDebugCmd: 0 14 | m_VCDebugOut: 0 15 | m_SemanticMergeMode: 2 16 | m_VCShowFailedCheckout: 1 17 | m_VCOverwriteFailedCheckoutAssets: 1 18 | m_VCOverlayIcons: 1 19 | m_VCAllowAsyncUpdate: 0 20 | -------------------------------------------------------------------------------- /omnisharp.json: -------------------------------------------------------------------------------- 1 | { 2 | "RoslynExtensionsOptions": { 3 | "enableDecompilationSupport": true 4 | } 5 | } -------------------------------------------------------------------------------- /scripts/coverageAssemblyFilters: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "::set-output name=result::+CareBoo.Burst.Delegates*,-CareBoo.Burst.Delegates*.Tests,-CareBoo.Burst.Delegates*.Samples*" 4 | -------------------------------------------------------------------------------- /scripts/release: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | npm publish --access public Packages/com.careboo.burst-delegates 4 | --------------------------------------------------------------------------------