├── .gitignore ├── LICENSE ├── README.md ├── sandbox ├── sandbox.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── sandbox │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── SceneDelegate.swift │ ├── UIWindowCustom.swift │ └── UnityBridge.swift ├── screenshots ├── build-step.jpg └── xcode-framework.jpg ├── unityapp ├── .gitignore ├── .vscode │ └── settings.json ├── Assets │ ├── Editor.meta │ ├── Editor │ │ ├── AutoBuilder.cs │ │ └── AutoBuilder.cs.meta │ ├── Plugins.meta │ ├── Plugins │ │ ├── iOS.meta │ │ └── iOS │ │ │ ├── API.swift │ │ │ ├── API.swift.meta │ │ │ ├── NativeCallProxy.h │ │ │ ├── NativeCallProxy.h.meta │ │ │ ├── NativeCallProxy.mm │ │ │ ├── NativeCallProxy.mm.meta │ │ │ ├── UnityCommunicationProtocol.swift │ │ │ ├── UnityCommunicationProtocol.swift.meta │ │ │ ├── UnityFramework.modulemap │ │ │ └── UnityFramework.modulemap.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Material.mat │ │ ├── Material.mat.meta │ │ ├── SampleScene.unity │ │ └── SampleScene.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── API.cs │ │ ├── API.cs.meta │ │ ├── AutoRotate.cs │ │ └── AutoRotate.cs.meta ├── Packages │ ├── manifest.json │ └── packages-lock.json └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── MemorySettings.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── SceneTemplateSettings.json │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ ├── VersionControlSettings.asset │ ├── XRSettings.asset │ └── boot.config └── unitysandbox.xcworkspace ├── contents.xcworkspacedata └── xcshareddata ├── IDEWorkspaceChecks.plist └── WorkspaceSettings.xcsettings /.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | # 3 | # 4 | 5 | .DS_Store 6 | UnityBuild/ 7 | 8 | # Xcode 9 | # 10 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 11 | 12 | ## User settings 13 | xcuserdata/ 14 | 15 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 16 | *.xcscmblueprint 17 | *.xccheckout 18 | 19 | ## Obj-C/Swift specific 20 | *.hmap 21 | 22 | ## App packaging 23 | *.ipa 24 | *.dSYM.zip 25 | *.dSYM 26 | 27 | .build/ 28 | 29 | # CocoaPods 30 | # 31 | # We recommend against adding the Pods directory to your .gitignore. However 32 | # you should judge for yourself, the pros and cons are mentioned at: 33 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 34 | # 35 | # Pods/ 36 | # 37 | # Add this line if you want to avoid checking in source code from the Xcode workspace 38 | # *.xcworkspace 39 | 40 | # Carthage 41 | # 42 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 43 | # Carthage/Checkouts 44 | 45 | Carthage/Build/ 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 David Peicho 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unity-swiftui-example 2 | 3 | This repository demonstrates how to integrate Unity 2020.2.1f1 into 4 | a Swift iOS app based on SwiftUI and built with XCode 12. 5 | 6 | ![Example of Unity running in a native SwiftUI app](https://davidpeicho.github.io/images/posts/unityswiftui-revisited.jpg) 7 | 8 | This repository is heavily based on the example published by Unity Technologies 9 | available [here](https://github.com/Unity-Technologies/uaal-example/blob/master/docs/ios.md). 10 | 11 | ## Features 12 | 13 | * Unity integration into SwiftUI 14 | * Communication from Unity to native code 15 | * Communication from native code to Unity **without** `SendMessage()` 16 | 17 | The last point will allow you to transfer heavy data 18 | without the need to serialize it to a string beforehand. 19 | 20 | ## Build 21 | 22 | ### 1, Unity Project 23 | 24 | * Open the Unity project located in the `unitapp/` folder 25 | * Select the scene `SampleScene.unity` 26 | * In `File > Build Settings...`, select the iOS target 27 | * Click the `Build` button and build in the director `UnityBuild` (so, `[REPO]/UnityBuild`) 28 | 29 | ![Screenshot showing where I build the Unity package](./screenshots/build-step.jpg) 30 | 31 | ### 2. XCode Project 32 | 33 | * Open the workspace `unitysandbox.xcworkspace` file, and not the `.xcodeproj` file 34 | * Ensure the UnityFramework framework is listed 35 | 36 | ![Screenshot showing where to add the UnityFramework entry](./screenshots/xcode-framework.jpg) 37 | 38 | ## How 39 | 40 | For a complete explanation of the architecture of this example, please have a 41 | look at my two blog posts: 42 | 43 | * [https://davidpeicho.github.io/blog/unity-integration-swiftui/](https://davidpeicho.github.io/blog/unity-integration-swiftui/) 44 | * [https://davidpeicho.github.io/blog/unity-swiftui-integration-revisited/](https://davidpeicho.github.io/blog/unity-swiftui-integration-revisited/). 45 | 46 | The second link is an improvement of the first one. The `main` branch of this repository is in the same state as the second blog post. 47 | 48 | ## FAQ 49 | 50 | #### Unity doesn't render to my app 51 | 52 | Between the moment you create the `UnityFramework` instance, and the moment you 53 | can display it, it seems like there is an issue. Some people try to add a delay, 54 | but this is definitely a hack. 55 | 56 | In this example, it is assumed that whenever the API script starts, the Unity 57 | window should be ready to be shown. This is achieved by sending a first message 58 | from Unity to the native code. Whether this will work in every cases or not 59 | is questionable, but for now it has done a good job for me. 60 | -------------------------------------------------------------------------------- /sandbox/sandbox.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E61361FC25BA3CFA0005B57A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E61361FB25BA3CFA0005B57A /* LaunchScreen.storyboard */; }; 11 | E61361FE25BA3D150005B57A /* UnityBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = E61361FD25BA3D150005B57A /* UnityBridge.swift */; }; 12 | E62A7ACA2773D326007CE3D6 /* UnityFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E62A7AC92773D326007CE3D6 /* UnityFramework.framework */; }; 13 | E62A7ACB2773D326007CE3D6 /* UnityFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E62A7AC92773D326007CE3D6 /* UnityFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | E62A7ACE2773E48A007CE3D6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62A7ACD2773E48A007CE3D6 /* AppDelegate.swift */; }; 15 | E62A7AD02773E4DA007CE3D6 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62A7ACF2773E4DA007CE3D6 /* SceneDelegate.swift */; }; 16 | E62A7AD42773F6AC007CE3D6 /* UIWindowCustom.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62A7AD32773F6AC007CE3D6 /* UIWindowCustom.swift */; }; 17 | E6DE818725BA36230019BED1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6DE818625BA36230019BED1 /* ContentView.swift */; }; 18 | E6DE818925BA36240019BED1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E6DE818825BA36240019BED1 /* Assets.xcassets */; }; 19 | E6DE818C25BA36240019BED1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E6DE818B25BA36240019BED1 /* Preview Assets.xcassets */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | E62A7ACC2773D326007CE3D6 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | E62A7ACB2773D326007CE3D6 /* UnityFramework.framework in Embed Frameworks */, 30 | ); 31 | name = "Embed Frameworks"; 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXCopyFilesBuildPhase section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | E61361FB25BA3CFA0005B57A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 38 | E61361FD25BA3D150005B57A /* UnityBridge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnityBridge.swift; sourceTree = ""; }; 39 | E62A7AC92773D326007CE3D6 /* UnityFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = UnityFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | E62A7ACD2773E48A007CE3D6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41 | E62A7ACF2773E4DA007CE3D6 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 42 | E62A7AD32773F6AC007CE3D6 /* UIWindowCustom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIWindowCustom.swift; sourceTree = ""; }; 43 | E64BDA9025BAD700005368B4 /* UnityFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = UnityFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | E6DE818125BA36230019BED1 /* sandbox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sandbox.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | E6DE818625BA36230019BED1 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 46 | E6DE818825BA36240019BED1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | E6DE818B25BA36240019BED1 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 48 | E6DE818D25BA36240019BED1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | E6DE817E25BA36230019BED1 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | E62A7ACA2773D326007CE3D6 /* UnityFramework.framework in Frameworks */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | E61361F525BA3AB40005B57A /* Frameworks */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | E62A7AC92773D326007CE3D6 /* UnityFramework.framework */, 67 | E64BDA9025BAD700005368B4 /* UnityFramework.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | E6DE817825BA36230019BED1 = { 73 | isa = PBXGroup; 74 | children = ( 75 | E6DE818325BA36230019BED1 /* sandbox */, 76 | E6DE818225BA36230019BED1 /* Products */, 77 | E61361F525BA3AB40005B57A /* Frameworks */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | E6DE818225BA36230019BED1 /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | E6DE818125BA36230019BED1 /* sandbox.app */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | E6DE818325BA36230019BED1 /* sandbox */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | E61361FB25BA3CFA0005B57A /* LaunchScreen.storyboard */, 93 | E6DE818625BA36230019BED1 /* ContentView.swift */, 94 | E61361FD25BA3D150005B57A /* UnityBridge.swift */, 95 | E6DE818825BA36240019BED1 /* Assets.xcassets */, 96 | E6DE818D25BA36240019BED1 /* Info.plist */, 97 | E6DE818A25BA36240019BED1 /* Preview Content */, 98 | E62A7ACD2773E48A007CE3D6 /* AppDelegate.swift */, 99 | E62A7ACF2773E4DA007CE3D6 /* SceneDelegate.swift */, 100 | E62A7AD32773F6AC007CE3D6 /* UIWindowCustom.swift */, 101 | ); 102 | path = sandbox; 103 | sourceTree = ""; 104 | }; 105 | E6DE818A25BA36240019BED1 /* Preview Content */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | E6DE818B25BA36240019BED1 /* Preview Assets.xcassets */, 109 | ); 110 | path = "Preview Content"; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | E6DE818025BA36230019BED1 /* sandbox */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = E6DE819025BA36240019BED1 /* Build configuration list for PBXNativeTarget "sandbox" */; 119 | buildPhases = ( 120 | E6DE817D25BA36230019BED1 /* Sources */, 121 | E6DE817E25BA36230019BED1 /* Frameworks */, 122 | E6DE817F25BA36230019BED1 /* Resources */, 123 | E62A7ACC2773D326007CE3D6 /* Embed Frameworks */, 124 | ); 125 | buildRules = ( 126 | ); 127 | dependencies = ( 128 | ); 129 | name = sandbox; 130 | productName = sandbox; 131 | productReference = E6DE818125BA36230019BED1 /* sandbox.app */; 132 | productType = "com.apple.product-type.application"; 133 | }; 134 | /* End PBXNativeTarget section */ 135 | 136 | /* Begin PBXProject section */ 137 | E6DE817925BA36230019BED1 /* Project object */ = { 138 | isa = PBXProject; 139 | attributes = { 140 | LastSwiftUpdateCheck = 1230; 141 | LastUpgradeCheck = 1230; 142 | TargetAttributes = { 143 | E6DE818025BA36230019BED1 = { 144 | CreatedOnToolsVersion = 12.3; 145 | }; 146 | }; 147 | }; 148 | buildConfigurationList = E6DE817C25BA36230019BED1 /* Build configuration list for PBXProject "sandbox" */; 149 | compatibilityVersion = "Xcode 9.3"; 150 | developmentRegion = en; 151 | hasScannedForEncodings = 0; 152 | knownRegions = ( 153 | en, 154 | Base, 155 | ); 156 | mainGroup = E6DE817825BA36230019BED1; 157 | productRefGroup = E6DE818225BA36230019BED1 /* Products */; 158 | projectDirPath = ""; 159 | projectRoot = ""; 160 | targets = ( 161 | E6DE818025BA36230019BED1 /* sandbox */, 162 | ); 163 | }; 164 | /* End PBXProject section */ 165 | 166 | /* Begin PBXResourcesBuildPhase section */ 167 | E6DE817F25BA36230019BED1 /* Resources */ = { 168 | isa = PBXResourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | E61361FC25BA3CFA0005B57A /* LaunchScreen.storyboard in Resources */, 172 | E6DE818C25BA36240019BED1 /* Preview Assets.xcassets in Resources */, 173 | E6DE818925BA36240019BED1 /* Assets.xcassets in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXSourcesBuildPhase section */ 180 | E6DE817D25BA36230019BED1 /* Sources */ = { 181 | isa = PBXSourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | E62A7AD02773E4DA007CE3D6 /* SceneDelegate.swift in Sources */, 185 | E62A7AD42773F6AC007CE3D6 /* UIWindowCustom.swift in Sources */, 186 | E62A7ACE2773E48A007CE3D6 /* AppDelegate.swift in Sources */, 187 | E6DE818725BA36230019BED1 /* ContentView.swift in Sources */, 188 | E61361FE25BA3D150005B57A /* UnityBridge.swift in Sources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXSourcesBuildPhase section */ 193 | 194 | /* Begin XCBuildConfiguration section */ 195 | E6DE818E25BA36240019BED1 /* Debug */ = { 196 | isa = XCBuildConfiguration; 197 | buildSettings = { 198 | ALWAYS_SEARCH_USER_PATHS = NO; 199 | CLANG_ANALYZER_NONNULL = YES; 200 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 201 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 202 | CLANG_CXX_LIBRARY = "libc++"; 203 | CLANG_ENABLE_MODULES = YES; 204 | CLANG_ENABLE_OBJC_ARC = YES; 205 | CLANG_ENABLE_OBJC_WEAK = YES; 206 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 207 | CLANG_WARN_BOOL_CONVERSION = YES; 208 | CLANG_WARN_COMMA = YES; 209 | CLANG_WARN_CONSTANT_CONVERSION = YES; 210 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 211 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 212 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 213 | CLANG_WARN_EMPTY_BODY = YES; 214 | CLANG_WARN_ENUM_CONVERSION = YES; 215 | CLANG_WARN_INFINITE_RECURSION = YES; 216 | CLANG_WARN_INT_CONVERSION = YES; 217 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 218 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 219 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 220 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 221 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 222 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 223 | CLANG_WARN_STRICT_PROTOTYPES = YES; 224 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 225 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 226 | CLANG_WARN_UNREACHABLE_CODE = YES; 227 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 228 | COPY_PHASE_STRIP = NO; 229 | DEBUG_INFORMATION_FORMAT = dwarf; 230 | ENABLE_STRICT_OBJC_MSGSEND = YES; 231 | ENABLE_TESTABILITY = YES; 232 | GCC_C_LANGUAGE_STANDARD = gnu11; 233 | GCC_DYNAMIC_NO_PIC = NO; 234 | GCC_NO_COMMON_BLOCKS = YES; 235 | GCC_OPTIMIZATION_LEVEL = 0; 236 | GCC_PREPROCESSOR_DEFINITIONS = ( 237 | "DEBUG=1", 238 | "$(inherited)", 239 | ); 240 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 241 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 242 | GCC_WARN_UNDECLARED_SELECTOR = YES; 243 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 244 | GCC_WARN_UNUSED_FUNCTION = YES; 245 | GCC_WARN_UNUSED_VARIABLE = YES; 246 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 247 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 248 | MTL_FAST_MATH = YES; 249 | ONLY_ACTIVE_ARCH = YES; 250 | SDKROOT = iphoneos; 251 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 252 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 253 | }; 254 | name = Debug; 255 | }; 256 | E6DE818F25BA36240019BED1 /* Release */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | ALWAYS_SEARCH_USER_PATHS = NO; 260 | CLANG_ANALYZER_NONNULL = YES; 261 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_ENABLE_OBJC_WEAK = YES; 267 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 268 | CLANG_WARN_BOOL_CONVERSION = YES; 269 | CLANG_WARN_COMMA = YES; 270 | CLANG_WARN_CONSTANT_CONVERSION = YES; 271 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 273 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 274 | CLANG_WARN_EMPTY_BODY = YES; 275 | CLANG_WARN_ENUM_CONVERSION = YES; 276 | CLANG_WARN_INFINITE_RECURSION = YES; 277 | CLANG_WARN_INT_CONVERSION = YES; 278 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 282 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 283 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 284 | CLANG_WARN_STRICT_PROTOTYPES = YES; 285 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 286 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 287 | CLANG_WARN_UNREACHABLE_CODE = YES; 288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 289 | COPY_PHASE_STRIP = NO; 290 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 291 | ENABLE_NS_ASSERTIONS = NO; 292 | ENABLE_STRICT_OBJC_MSGSEND = YES; 293 | GCC_C_LANGUAGE_STANDARD = gnu11; 294 | GCC_NO_COMMON_BLOCKS = YES; 295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 296 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 297 | GCC_WARN_UNDECLARED_SELECTOR = YES; 298 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 299 | GCC_WARN_UNUSED_FUNCTION = YES; 300 | GCC_WARN_UNUSED_VARIABLE = YES; 301 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 302 | MTL_ENABLE_DEBUG_INFO = NO; 303 | MTL_FAST_MATH = YES; 304 | SDKROOT = iphoneos; 305 | SWIFT_COMPILATION_MODE = wholemodule; 306 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 307 | VALIDATE_PRODUCT = YES; 308 | }; 309 | name = Release; 310 | }; 311 | E6DE819125BA36240019BED1 /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 316 | CODE_SIGN_STYLE = Automatic; 317 | DEVELOPMENT_ASSET_PATHS = "\"sandbox/Preview Content\""; 318 | DEVELOPMENT_TEAM = ""; 319 | ENABLE_PREVIEWS = YES; 320 | INFOPLIST_FILE = sandbox/Info.plist; 321 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 322 | LD_RUNPATH_SEARCH_PATHS = ( 323 | "$(inherited)", 324 | "@executable_path/Frameworks", 325 | ); 326 | PRODUCT_BUNDLE_IDENTIFIER = com.sandbox.example.sandbox; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | SWIFT_OBJC_BRIDGING_HEADER = ""; 329 | SWIFT_VERSION = 5.0; 330 | TARGETED_DEVICE_FAMILY = "1,2"; 331 | }; 332 | name = Debug; 333 | }; 334 | E6DE819225BA36240019BED1 /* Release */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 338 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 339 | CODE_SIGN_STYLE = Automatic; 340 | DEVELOPMENT_ASSET_PATHS = "\"sandbox/Preview Content\""; 341 | DEVELOPMENT_TEAM = ""; 342 | ENABLE_PREVIEWS = YES; 343 | INFOPLIST_FILE = sandbox/Info.plist; 344 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 345 | LD_RUNPATH_SEARCH_PATHS = ( 346 | "$(inherited)", 347 | "@executable_path/Frameworks", 348 | ); 349 | PRODUCT_BUNDLE_IDENTIFIER = com.sandbox.example.sandbox; 350 | PRODUCT_NAME = "$(TARGET_NAME)"; 351 | SWIFT_OBJC_BRIDGING_HEADER = ""; 352 | SWIFT_VERSION = 5.0; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Release; 356 | }; 357 | /* End XCBuildConfiguration section */ 358 | 359 | /* Begin XCConfigurationList section */ 360 | E6DE817C25BA36230019BED1 /* Build configuration list for PBXProject "sandbox" */ = { 361 | isa = XCConfigurationList; 362 | buildConfigurations = ( 363 | E6DE818E25BA36240019BED1 /* Debug */, 364 | E6DE818F25BA36240019BED1 /* Release */, 365 | ); 366 | defaultConfigurationIsVisible = 0; 367 | defaultConfigurationName = Release; 368 | }; 369 | E6DE819025BA36240019BED1 /* Build configuration list for PBXNativeTarget "sandbox" */ = { 370 | isa = XCConfigurationList; 371 | buildConfigurations = ( 372 | E6DE819125BA36240019BED1 /* Debug */, 373 | E6DE819225BA36240019BED1 /* Release */, 374 | ); 375 | defaultConfigurationIsVisible = 0; 376 | defaultConfigurationName = Release; 377 | }; 378 | /* End XCConfigurationList section */ 379 | }; 380 | rootObject = E6DE817925BA36230019BED1 /* Project object */; 381 | } 382 | -------------------------------------------------------------------------------- /sandbox/sandbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sandbox/sandbox.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sandbox/sandbox/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @main 4 | class AppDelegate: NSObject, UIApplicationDelegate { 5 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 6 | // Override point for customization after application launch. 7 | return true 8 | } 9 | 10 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 11 | let sceneConfig = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) 12 | sceneConfig.delegateClass = SceneDelegate.self 13 | return sceneConfig 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /sandbox/sandbox/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sandbox/sandbox/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /sandbox/sandbox/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /sandbox/sandbox/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // sandbox 4 | // 5 | // Created by David Peicho on 1/21/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var color = Color( 12 | .sRGB, 13 | red: 0.98, green: 0.9, blue: 0.2) 14 | 15 | var body: some View { 16 | ZStack { 17 | // PassthroughView() 18 | ColorPicker("", selection: $color) 19 | .frame(width: 50, height: 50, alignment: .center) 20 | .onChange(of: color) { newValue in 21 | let colorString = "\(newValue)" 22 | let arr = colorString.components(separatedBy: " ") 23 | if arr.count > 1 { 24 | let r = CGFloat(Float(arr[1]) ?? 1) 25 | let g = CGFloat(Float(arr[2]) ?? 1) 26 | let b = CGFloat(Float(arr[3]) ?? 1) 27 | UnityBridge.getInstance().api.setColor(r: r, g: g, b: b) 28 | } 29 | } 30 | .onAppear { 31 | let api = UnityBridge.getInstance() 32 | api.show() 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sandbox/sandbox/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UILaunchStoryboardName 6 | LaunchScreen 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIApplicationSceneManifest 26 | 27 | UIApplicationSupportsMultipleScenes 28 | 29 | 30 | UIApplicationSupportsIndirectInputEvents 31 | 32 | UILaunchScreen 33 | 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /sandbox/sandbox/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sandbox/sandbox/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /sandbox/sandbox/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import SwiftUI 3 | 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | if let windowScene = scene as? UIWindowScene { 10 | // Creates the bridge between UIKit and SwiftUI. 11 | // This is done automatically when not using an `App`. 12 | let vc = UIHostingController(rootView: ContentView()) 13 | 14 | // Sets the UIHostingView to transparent so we can see 15 | // the Unity window behind it. 16 | vc.view.isOpaque = false 17 | vc.view.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.0) 18 | vc.view.tag = UIWindowCustom.PassthroughTag 19 | 20 | self.window = UIWindowCustom(windowScene: windowScene) 21 | self.window!.windowLevel = .normal + 100.0 22 | self.window!.rootViewController = vc 23 | 24 | self.window!.makeKeyAndVisible() 25 | } 26 | } 27 | 28 | func sceneDidDisconnect(_ scene: UIScene) { 29 | } 30 | 31 | func sceneDidBecomeActive(_ scene: UIScene) { 32 | } 33 | 34 | func sceneWillResignActive(_ scene: UIScene) { 35 | } 36 | 37 | func sceneWillEnterForeground(_ scene: UIScene) { 38 | } 39 | 40 | func sceneDidEnterBackground(_ scene: UIScene) { 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /sandbox/sandbox/UIWindowCustom.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /// Custom Window class used to allow events to pass through 4 | /// depending on what view is targeted. 5 | /// 6 | /// Because our application is multi-windows, this is useful to allow event 7 | /// to go through 8 | class UIWindowCustom: UIWindow { 9 | 10 | /// The tag is used to identify the view during `hitTest`. 11 | /// 12 | /// - Note: 13 | /// Be careful not to share this tag with other views that shouldn't act as passthroughs. 14 | public static let PassthroughTag = 999999 15 | 16 | override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { 17 | guard let view = super.hitTest(point, with: event) else { 18 | return nil 19 | } 20 | if view.tag == UIWindowCustom.PassthroughTag { 21 | // Propagates event that are caught by passthrough views. 22 | return nil 23 | } 24 | // Do not propagate events, we reached a "normal" view. 25 | return view 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /sandbox/sandbox/UnityBridge.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UnityFramework 3 | 4 | class UnityBridge: UIResponder, UIApplicationDelegate, UnityFrameworkListener { 5 | 6 | private static var instance : UnityBridge? 7 | 8 | internal(set) public var isReady: Bool = false 9 | public var ready: () -> () = {} 10 | 11 | public let api: UnityAPI 12 | private let ufw: UnityFramework 13 | 14 | public var view: UIView? { 15 | get { return self.ufw.appController()?.rootView } 16 | } 17 | 18 | public static func getInstance() -> UnityBridge { 19 | if UnityBridge.instance == nil { 20 | UnityBridge.instance = UnityBridge() 21 | } 22 | return UnityBridge.instance! 23 | } 24 | 25 | private static func loadUnityFramework() -> UnityFramework? { 26 | let bundlePath: String = Bundle.main.bundlePath + "/Frameworks/UnityFramework.framework" 27 | let bundle = Bundle(path: bundlePath) 28 | if bundle?.isLoaded == false { 29 | bundle?.load() 30 | } 31 | 32 | let ufw = bundle?.principalClass?.getInstance() 33 | if ufw?.appController() == nil { 34 | let machineHeader = UnsafeMutablePointer.allocate(capacity: 1) 35 | machineHeader.pointee = _mh_execute_header 36 | ufw!.setExecuteHeader(machineHeader) 37 | } 38 | return ufw 39 | } 40 | 41 | internal override init() { 42 | self.ufw = UnityBridge.loadUnityFramework()! 43 | self.ufw.setDataBundleId("com.unity3d.framework") 44 | self.api = UnityAPI() 45 | super.init() 46 | self.api.communicator = self 47 | self.ufw.register(self) 48 | FrameworkLibAPI.registerAPIforNativeCalls(self.api) 49 | 50 | self.api.ready = { 51 | self.isReady = true 52 | self.ready() 53 | } 54 | 55 | ufw.runEmbedded(withArgc: CommandLine.argc, argv: CommandLine.unsafeArgv, appLaunchOpts: nil) 56 | } 57 | 58 | public func show() { 59 | if self.isReady { 60 | self.ufw.showUnityWindow() 61 | } 62 | } 63 | 64 | public func show(controller: UIViewController) { 65 | if self.isReady { 66 | self.ufw.showUnityWindow() 67 | } 68 | if let view = self.view { 69 | controller.view?.addSubview(view) 70 | // view.addSubview(controller.view!) 71 | } 72 | } 73 | 74 | public func unload() { 75 | self.ufw.unloadApplication() 76 | } 77 | 78 | internal func unityDidUnload(_ notification: Notification!) { 79 | ufw.unregisterFrameworkListener(self) 80 | UnityBridge.instance = nil 81 | } 82 | 83 | } 84 | 85 | extension UnityBridge: UnityCommunicationProtocol { 86 | 87 | public func sendMessageToGameObject(go: String, function: String, message: String) { 88 | self.ufw.sendMessageToGO(withName: go, functionName: function, message: message) 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /screenshots/build-step.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidPeicho/unity-swiftui-example/7cbdf5bcbce08424d8a6bc5bac4c526ccfd566e8/screenshots/build-step.jpg -------------------------------------------------------------------------------- /screenshots/xcode-framework.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidPeicho/unity-swiftui-example/7cbdf5bcbce08424d8a6bc5bac4c526ccfd566e8/screenshots/xcode-framework.jpg -------------------------------------------------------------------------------- /unityapp/.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 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Asset meta data should only be ignored when the corresponding asset is also ignored 18 | !/[Aa]ssets/**/*.meta 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | 63 | # Crashlytics generated file 64 | crashlytics-build.properties 65 | 66 | # Packed Addressables 67 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 68 | 69 | # Temporary auto-generated Android Assets 70 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 71 | /[Aa]ssets/[Ss]treamingAssets/aa/* 72 | -------------------------------------------------------------------------------- /unityapp/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /unityapp/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ea089898f27a4a9382b44fb0ab7e3c7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Editor/AutoBuilder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Callbacks; 4 | using UnityEditor.iOS.Xcode; 5 | using System.Collections; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | 9 | /// 10 | /// This class will update the generated XCode configuration. 11 | /// 12 | /// This is used to automate some manual steps that we keep 13 | /// doing over-and-over when building. 14 | /// 15 | public static class AutoBuilder 16 | { 17 | private static string MODULE_MAP = "UnityFramework.modulemap"; 18 | private static string INTERFACE_HEADER = "NativeCallProxy.h"; 19 | 20 | /// 21 | /// Retrieves the name of the project 22 | /// 23 | static string GetProjectName() 24 | { 25 | string[] s = Application.dataPath.Split('/'); 26 | return s[s.Length - 2]; 27 | } 28 | 29 | static string[] GetScenePaths() 30 | { 31 | string[] scenes = new string[EditorBuildSettings.scenes.Length]; 32 | for(int i = 0; i < scenes.Length; i++) 33 | { 34 | scenes[i] = EditorBuildSettings.scenes[i].path; 35 | } 36 | return scenes; 37 | } 38 | [MenuItem("File/AutoBuilder/iOS")] 39 | static void PerformiOSBuild() 40 | { 41 | EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS); 42 | BuildPipeline.BuildPlayer(GetScenePaths(), "Build/iOS", BuildTarget.iOS, BuildOptions.None); 43 | } 44 | 45 | [PostProcessBuild] 46 | public static void OnPostProcessBuild(BuildTarget buildTarget, string path) 47 | { 48 | switch (buildTarget) 49 | { 50 | case BuildTarget.iOS: 51 | { 52 | var xcodePath = path + "/Unity-Iphone.xcodeproj/project.pbxproj"; 53 | var proj = new PBXProject(); 54 | proj.ReadFromFile(xcodePath); 55 | 56 | var targetGuid = proj.GetUnityFrameworkTargetGuid(); 57 | 58 | proj.SetBuildProperty(targetGuid, "COREML_CODEGEN_LANGUAGE", "Swift"); 59 | proj.SetBuildProperty(targetGuid, "SWIFT_VERSION", "5.0"); 60 | proj.AddBuildProperty(targetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO"); 61 | proj.SetBuildProperty(targetGuid, "EMBEDDED_CONTENT_CONTAINS_SWIFT", "YES"); 62 | proj.SetBuildProperty( 63 | targetGuid, 64 | "FRAMERWORK_SEARCH_PATHS", 65 | "$(inherited) $(PROJECT_DIR) $(PROJECT_DIR)/Frameworks" 66 | ); 67 | proj.SetBuildProperty(targetGuid, "DEFINES_MODULE", "YES"); 68 | 69 | // Adds the data folder to the Unity target. 70 | // This is basically the manual step we were doing before! 71 | var dataGUID = proj.FindFileGuidByProjectPath("Data"); 72 | proj.AddFileToBuild(targetGuid, dataGUID); 73 | 74 | /** 75 | * Module Map 76 | */ 77 | 78 | var moduleFileName = "UnityFramework/UnityFramework.modulemap"; 79 | var moduleFile = path + "/" + moduleFileName; 80 | if (!File.Exists(moduleFile)) 81 | { 82 | FileUtil.CopyFileOrDirectory("Assets/Plugins/iOS/" + AutoBuilder.MODULE_MAP, moduleFile); 83 | proj.AddFile(moduleFile, moduleFileName); 84 | proj.AddBuildProperty(targetGuid, "MODULEMAP_FILE", "$(SRCROOT)/" + moduleFileName); 85 | } 86 | 87 | /** 88 | * Headers 89 | */ 90 | 91 | // Sets the visiblity of our native API header. 92 | // This is basically the manual step we were doing before! 93 | var unityInterfaceGuid = proj.FindFileGuidByProjectPath("Libraries/Plugins/iOS/" + AutoBuilder.INTERFACE_HEADER); 94 | proj.AddPublicHeaderToBuild(targetGuid, unityInterfaceGuid); 95 | 96 | proj.WriteToFile(xcodePath); 97 | break; 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /unityapp/Assets/Editor/AutoBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ef61fd9f978d47068addbb9fcf2b2dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baf5c2f69e2da4834acfe74d1cfd4bd4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94947094d5024496ab9718a4d6fa9472 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/API.swift: -------------------------------------------------------------------------------- 1 | /// Serialized structure sent to Unity. 2 | /// 3 | /// This is used on the Unity side to decide what to do when a message 4 | /// arrives. 5 | struct MessageWithData: Encodable { 6 | var type: String 7 | var data: T 8 | } 9 | 10 | /// Swift API to handle Native <> Unity communication. 11 | /// 12 | /// - Note: 13 | /// - Message passing is done via serialized JSON 14 | /// - Message passing is done via function pointer exchanged between Unity <> Native 15 | public class UnityAPI: NativeCallsProtocol { 16 | 17 | // Name of the gameobject that receives the 18 | // messages from the native side. 19 | private static let API_GAMEOBJECT = "APIEntryPoint" 20 | // Name of the method to call when sending 21 | // messages from the native side. 22 | private static let API_MESSAGE_FUNCTION = "ReceiveMessage" 23 | 24 | public weak var communicator: UnityCommunicationProtocol! 25 | public var ready: () -> () = {} 26 | 27 | /** 28 | Function pointers to static functions declared in Unity 29 | */ 30 | 31 | private var testCallback: TestDelegate! 32 | 33 | public init() {} 34 | 35 | /** 36 | * Public API for developers. 37 | */ 38 | 39 | /// Friendly wrapper arround the message passing system. 40 | /// 41 | /// - Note: 42 | /// This wrapper is used to get friendlier API for Swift developers. 43 | /// They shouldn't have to care about how the color is sent to Unity. 44 | public func setColor(r: CGFloat, g: CGFloat, b: CGFloat) { 45 | let data = [r, g, b] 46 | sendMessage(type: "change-color", data: data) 47 | } 48 | 49 | public func test(_ value: String) { 50 | self.testCallback(value) 51 | } 52 | 53 | /** 54 | * Internal API. 55 | */ 56 | 57 | public func onUnityStateChange(_ state: String) { 58 | switch (state) { 59 | case "ready": 60 | self.ready() 61 | default: 62 | return 63 | } 64 | } 65 | 66 | public func onSetTestDelegate(_ delegate: TestDelegate!) { 67 | self.testCallback = delegate 68 | } 69 | 70 | /** 71 | * Private API. 72 | */ 73 | 74 | /// Internal function sending message to Unity. 75 | private func sendMessage(type: String, data: T) { 76 | let message = MessageWithData(type: type, data: data) 77 | let encoder = JSONEncoder() 78 | let json = try! encoder.encode(message) 79 | communicator.sendMessageToGameObject( 80 | go: UnityAPI.API_GAMEOBJECT, 81 | function: UnityAPI.API_MESSAGE_FUNCTION, 82 | message: String(data: json, encoding: .utf8)! 83 | ) 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/API.swift.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98d49f0f263284d75b1091e351343672 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | iPhone: iOS 27 | second: 28 | enabled: 1 29 | settings: 30 | AddToEmbeddedBinaries: false 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/NativeCallProxy.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (*TestDelegate)(const char* name); 4 | 5 | // NativeCallsProtocol defines protocol with methods you want to be called 6 | // from managed. 7 | // 8 | // The communication via native calls is done using a delegate. Developer on the 9 | // iOS side will register a delegate to Unity, and the `NativeCallProxy` file 10 | // will be in charge of bridging Unity's call to the iOS delegate. 11 | @protocol NativeCallsProtocol 12 | @required 13 | - (void) onUnityStateChange:(const NSString*) state; 14 | - (void) onSetTestDelegate:(TestDelegate) delegate; 15 | // other methods 16 | @end 17 | 18 | __attribute__ ((visibility("default"))) 19 | @interface FrameworkLibAPI : NSObject 20 | // call it any time after UnityFrameworkLoad to set object implementing NativeCallsProtocol methods 21 | +(void) registerAPIforNativeCalls:(id) aApi; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/NativeCallProxy.h.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd4b22150001146b9abf004ffcf10177 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | iPhone: iOS 27 | second: 28 | enabled: 1 29 | settings: 30 | AddToEmbeddedBinaries: false 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/NativeCallProxy.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NativeCallProxy.h" 3 | 4 | @implementation FrameworkLibAPI 5 | 6 | id api = NULL; 7 | +(void) registerAPIforNativeCalls:(id) aApi 8 | { 9 | api = aApi; 10 | } 11 | 12 | @end 13 | 14 | /** 15 | * The methods below bridge the calls from Unity into iOS. When Unity call any 16 | * of the methods below, the call is forwarded to the iOS bridge using the 17 | * `NativeCallsProtocol`. 18 | */ 19 | extern "C" { 20 | 21 | void 22 | sendUnityStateUpdate(const char* state) 23 | { 24 | const NSString* str = @(state); 25 | [api onUnityStateChange: str]; 26 | } 27 | 28 | void 29 | setTestDelegate(TestDelegate delegate) 30 | { 31 | [api onSetTestDelegate: delegate]; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/NativeCallProxy.mm.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2e99e80199054c21b6989c2600dbbdf 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | iPhone: iOS 27 | second: 28 | enabled: 1 29 | settings: 30 | AddToEmbeddedBinaries: false 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/UnityCommunicationProtocol.swift: -------------------------------------------------------------------------------- 1 | public protocol UnityCommunicationProtocol: AnyObject { 2 | func sendMessageToGameObject(go: String, function: String, message: String) -> () 3 | } 4 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/UnityCommunicationProtocol.swift.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c066ec1755d914e9fabb61006ae02890 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | iPhone: iOS 27 | second: 28 | enabled: 1 29 | settings: 30 | AddToEmbeddedBinaries: false 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/UnityFramework.modulemap: -------------------------------------------------------------------------------- 1 | framework module UnityFramework { 2 | umbrella header "UnityFramework.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | module UnityInterface { 8 | header "NativeCallProxy.h" 9 | export * 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /unityapp/Assets/Plugins/iOS/UnityFramework.modulemap.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e0bb0d1e330a4514b0b6fdbb21250e1 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unityapp/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60d4d290d59f8458799c7c3efd6d6726 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Scenes/Material.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Material 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Ints: [] 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 0 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 1 76 | m_Colors: 77 | - _Color: {r: 1, g: 1, b: 1, a: 1} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | m_BuildTextureStacks: [] 80 | -------------------------------------------------------------------------------- /unityapp/Assets/Scenes/Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 535d4e28a0f91476bb88636056919440 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &88398780 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 88398783} 135 | - component: {fileID: 88398782} 136 | - component: {fileID: 88398781} 137 | m_Layer: 0 138 | m_Name: EventSystem 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &88398781 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 88398780} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | m_HorizontalAxis: Horizontal 157 | m_VerticalAxis: Vertical 158 | m_SubmitButton: Submit 159 | m_CancelButton: Cancel 160 | m_InputActionsPerSecond: 10 161 | m_RepeatDelay: 0.5 162 | m_ForceModuleActive: 0 163 | --- !u!114 &88398782 164 | MonoBehaviour: 165 | m_ObjectHideFlags: 0 166 | m_CorrespondingSourceObject: {fileID: 0} 167 | m_PrefabInstance: {fileID: 0} 168 | m_PrefabAsset: {fileID: 0} 169 | m_GameObject: {fileID: 88398780} 170 | m_Enabled: 1 171 | m_EditorHideFlags: 0 172 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 173 | m_Name: 174 | m_EditorClassIdentifier: 175 | m_FirstSelected: {fileID: 0} 176 | m_sendNavigationEvents: 1 177 | m_DragThreshold: 10 178 | --- !u!4 &88398783 179 | Transform: 180 | m_ObjectHideFlags: 0 181 | m_CorrespondingSourceObject: {fileID: 0} 182 | m_PrefabInstance: {fileID: 0} 183 | m_PrefabAsset: {fileID: 0} 184 | m_GameObject: {fileID: 88398780} 185 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 186 | m_LocalPosition: {x: 0, y: 0, z: 0} 187 | m_LocalScale: {x: 1, y: 1, z: 1} 188 | m_ConstrainProportionsScale: 0 189 | m_Children: [] 190 | m_Father: {fileID: 0} 191 | m_RootOrder: 3 192 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 193 | --- !u!1 &168510957 194 | GameObject: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | serializedVersion: 6 200 | m_Component: 201 | - component: {fileID: 168510959} 202 | - component: {fileID: 168510958} 203 | m_Layer: 0 204 | m_Name: APIEntryPoint 205 | m_TagString: Untagged 206 | m_Icon: {fileID: 0} 207 | m_NavMeshLayer: 0 208 | m_StaticEditorFlags: 0 209 | m_IsActive: 1 210 | --- !u!114 &168510958 211 | MonoBehaviour: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | m_GameObject: {fileID: 168510957} 217 | m_Enabled: 1 218 | m_EditorHideFlags: 0 219 | m_Script: {fileID: 11500000, guid: 10890956554ef4ccf9e3891a21d59cff, type: 3} 220 | m_Name: 221 | m_EditorClassIdentifier: 222 | cube: {fileID: 1415507575} 223 | --- !u!4 &168510959 224 | Transform: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | m_GameObject: {fileID: 168510957} 230 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 231 | m_LocalPosition: {x: 0, y: 0, z: 0} 232 | m_LocalScale: {x: 1, y: 1, z: 1} 233 | m_ConstrainProportionsScale: 0 234 | m_Children: [] 235 | m_Father: {fileID: 0} 236 | m_RootOrder: 2 237 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 238 | --- !u!1 &705507993 239 | GameObject: 240 | m_ObjectHideFlags: 0 241 | m_CorrespondingSourceObject: {fileID: 0} 242 | m_PrefabInstance: {fileID: 0} 243 | m_PrefabAsset: {fileID: 0} 244 | serializedVersion: 6 245 | m_Component: 246 | - component: {fileID: 705507995} 247 | - component: {fileID: 705507994} 248 | m_Layer: 0 249 | m_Name: Directional Light 250 | m_TagString: Untagged 251 | m_Icon: {fileID: 0} 252 | m_NavMeshLayer: 0 253 | m_StaticEditorFlags: 0 254 | m_IsActive: 1 255 | --- !u!108 &705507994 256 | Light: 257 | m_ObjectHideFlags: 0 258 | m_CorrespondingSourceObject: {fileID: 0} 259 | m_PrefabInstance: {fileID: 0} 260 | m_PrefabAsset: {fileID: 0} 261 | m_GameObject: {fileID: 705507993} 262 | m_Enabled: 1 263 | serializedVersion: 10 264 | m_Type: 1 265 | m_Shape: 0 266 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 267 | m_Intensity: 1 268 | m_Range: 10 269 | m_SpotAngle: 30 270 | m_InnerSpotAngle: 21.802082 271 | m_CookieSize: 10 272 | m_Shadows: 273 | m_Type: 2 274 | m_Resolution: -1 275 | m_CustomResolution: -1 276 | m_Strength: 1 277 | m_Bias: 0.05 278 | m_NormalBias: 0.4 279 | m_NearPlane: 0.2 280 | m_CullingMatrixOverride: 281 | e00: 1 282 | e01: 0 283 | e02: 0 284 | e03: 0 285 | e10: 0 286 | e11: 1 287 | e12: 0 288 | e13: 0 289 | e20: 0 290 | e21: 0 291 | e22: 1 292 | e23: 0 293 | e30: 0 294 | e31: 0 295 | e32: 0 296 | e33: 1 297 | m_UseCullingMatrixOverride: 0 298 | m_Cookie: {fileID: 0} 299 | m_DrawHalo: 0 300 | m_Flare: {fileID: 0} 301 | m_RenderMode: 0 302 | m_CullingMask: 303 | serializedVersion: 2 304 | m_Bits: 4294967295 305 | m_RenderingLayerMask: 1 306 | m_Lightmapping: 1 307 | m_LightShadowCasterMode: 0 308 | m_AreaSize: {x: 1, y: 1} 309 | m_BounceIntensity: 1 310 | m_ColorTemperature: 6570 311 | m_UseColorTemperature: 0 312 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 313 | m_UseBoundingSphereOverride: 0 314 | m_UseViewFrustumForShadowCasterCull: 1 315 | m_ShadowRadius: 0 316 | m_ShadowAngle: 0 317 | --- !u!4 &705507995 318 | Transform: 319 | m_ObjectHideFlags: 0 320 | m_CorrespondingSourceObject: {fileID: 0} 321 | m_PrefabInstance: {fileID: 0} 322 | m_PrefabAsset: {fileID: 0} 323 | m_GameObject: {fileID: 705507993} 324 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 325 | m_LocalPosition: {x: 0, y: 3, z: 0} 326 | m_LocalScale: {x: 1, y: 1, z: 1} 327 | m_ConstrainProportionsScale: 0 328 | m_Children: [] 329 | m_Father: {fileID: 0} 330 | m_RootOrder: 1 331 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 332 | --- !u!1 &963194225 333 | GameObject: 334 | m_ObjectHideFlags: 0 335 | m_CorrespondingSourceObject: {fileID: 0} 336 | m_PrefabInstance: {fileID: 0} 337 | m_PrefabAsset: {fileID: 0} 338 | serializedVersion: 6 339 | m_Component: 340 | - component: {fileID: 963194228} 341 | - component: {fileID: 963194227} 342 | - component: {fileID: 963194226} 343 | m_Layer: 0 344 | m_Name: Main Camera 345 | m_TagString: MainCamera 346 | m_Icon: {fileID: 0} 347 | m_NavMeshLayer: 0 348 | m_StaticEditorFlags: 0 349 | m_IsActive: 1 350 | --- !u!81 &963194226 351 | AudioListener: 352 | m_ObjectHideFlags: 0 353 | m_CorrespondingSourceObject: {fileID: 0} 354 | m_PrefabInstance: {fileID: 0} 355 | m_PrefabAsset: {fileID: 0} 356 | m_GameObject: {fileID: 963194225} 357 | m_Enabled: 1 358 | --- !u!20 &963194227 359 | Camera: 360 | m_ObjectHideFlags: 0 361 | m_CorrespondingSourceObject: {fileID: 0} 362 | m_PrefabInstance: {fileID: 0} 363 | m_PrefabAsset: {fileID: 0} 364 | m_GameObject: {fileID: 963194225} 365 | m_Enabled: 1 366 | serializedVersion: 2 367 | m_ClearFlags: 1 368 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 369 | m_projectionMatrixMode: 1 370 | m_GateFitMode: 2 371 | m_FOVAxisMode: 0 372 | m_SensorSize: {x: 36, y: 24} 373 | m_LensShift: {x: 0, y: 0} 374 | m_FocalLength: 50 375 | m_NormalizedViewPortRect: 376 | serializedVersion: 2 377 | x: 0 378 | y: 0 379 | width: 1 380 | height: 1 381 | near clip plane: 0.3 382 | far clip plane: 1000 383 | field of view: 60 384 | orthographic: 0 385 | orthographic size: 5 386 | m_Depth: -1 387 | m_CullingMask: 388 | serializedVersion: 2 389 | m_Bits: 4294967295 390 | m_RenderingPath: -1 391 | m_TargetTexture: {fileID: 0} 392 | m_TargetDisplay: 0 393 | m_TargetEye: 3 394 | m_HDR: 1 395 | m_AllowMSAA: 1 396 | m_AllowDynamicResolution: 0 397 | m_ForceIntoRT: 0 398 | m_OcclusionCulling: 1 399 | m_StereoConvergence: 10 400 | m_StereoSeparation: 0.022 401 | --- !u!4 &963194228 402 | Transform: 403 | m_ObjectHideFlags: 0 404 | m_CorrespondingSourceObject: {fileID: 0} 405 | m_PrefabInstance: {fileID: 0} 406 | m_PrefabAsset: {fileID: 0} 407 | m_GameObject: {fileID: 963194225} 408 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 409 | m_LocalPosition: {x: 0, y: 0.18, z: -3.63} 410 | m_LocalScale: {x: 1, y: 1, z: 1} 411 | m_ConstrainProportionsScale: 0 412 | m_Children: [] 413 | m_Father: {fileID: 0} 414 | m_RootOrder: 0 415 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 416 | --- !u!1 &1415507575 417 | GameObject: 418 | m_ObjectHideFlags: 0 419 | m_CorrespondingSourceObject: {fileID: 0} 420 | m_PrefabInstance: {fileID: 0} 421 | m_PrefabAsset: {fileID: 0} 422 | serializedVersion: 6 423 | m_Component: 424 | - component: {fileID: 1415507580} 425 | - component: {fileID: 1415507579} 426 | - component: {fileID: 1415507578} 427 | - component: {fileID: 1415507577} 428 | - component: {fileID: 1415507576} 429 | m_Layer: 0 430 | m_Name: Cube 431 | m_TagString: Untagged 432 | m_Icon: {fileID: 0} 433 | m_NavMeshLayer: 0 434 | m_StaticEditorFlags: 0 435 | m_IsActive: 1 436 | --- !u!114 &1415507576 437 | MonoBehaviour: 438 | m_ObjectHideFlags: 0 439 | m_CorrespondingSourceObject: {fileID: 0} 440 | m_PrefabInstance: {fileID: 0} 441 | m_PrefabAsset: {fileID: 0} 442 | m_GameObject: {fileID: 1415507575} 443 | m_Enabled: 1 444 | m_EditorHideFlags: 0 445 | m_Script: {fileID: 11500000, guid: e57fc7659a26142d083679a65fdc0f88, type: 3} 446 | m_Name: 447 | m_EditorClassIdentifier: 448 | --- !u!65 &1415507577 449 | BoxCollider: 450 | m_ObjectHideFlags: 0 451 | m_CorrespondingSourceObject: {fileID: 0} 452 | m_PrefabInstance: {fileID: 0} 453 | m_PrefabAsset: {fileID: 0} 454 | m_GameObject: {fileID: 1415507575} 455 | m_Material: {fileID: 0} 456 | m_IsTrigger: 0 457 | m_Enabled: 1 458 | serializedVersion: 2 459 | m_Size: {x: 1, y: 1, z: 1} 460 | m_Center: {x: 0, y: 0, z: 0} 461 | --- !u!23 &1415507578 462 | MeshRenderer: 463 | m_ObjectHideFlags: 0 464 | m_CorrespondingSourceObject: {fileID: 0} 465 | m_PrefabInstance: {fileID: 0} 466 | m_PrefabAsset: {fileID: 0} 467 | m_GameObject: {fileID: 1415507575} 468 | m_Enabled: 1 469 | m_CastShadows: 1 470 | m_ReceiveShadows: 1 471 | m_DynamicOccludee: 1 472 | m_StaticShadowCaster: 0 473 | m_MotionVectors: 1 474 | m_LightProbeUsage: 1 475 | m_ReflectionProbeUsage: 1 476 | m_RayTracingMode: 2 477 | m_RayTraceProcedural: 0 478 | m_RenderingLayerMask: 1 479 | m_RendererPriority: 0 480 | m_Materials: 481 | - {fileID: 2100000, guid: 535d4e28a0f91476bb88636056919440, type: 2} 482 | m_StaticBatchInfo: 483 | firstSubMesh: 0 484 | subMeshCount: 0 485 | m_StaticBatchRoot: {fileID: 0} 486 | m_ProbeAnchor: {fileID: 0} 487 | m_LightProbeVolumeOverride: {fileID: 0} 488 | m_ScaleInLightmap: 1 489 | m_ReceiveGI: 1 490 | m_PreserveUVs: 0 491 | m_IgnoreNormalsForChartDetection: 0 492 | m_ImportantGI: 0 493 | m_StitchLightmapSeams: 1 494 | m_SelectedEditorRenderState: 3 495 | m_MinimumChartSize: 4 496 | m_AutoUVMaxDistance: 0.5 497 | m_AutoUVMaxAngle: 89 498 | m_LightmapParameters: {fileID: 0} 499 | m_SortingLayerID: 0 500 | m_SortingLayer: 0 501 | m_SortingOrder: 0 502 | m_AdditionalVertexStreams: {fileID: 0} 503 | --- !u!33 &1415507579 504 | MeshFilter: 505 | m_ObjectHideFlags: 0 506 | m_CorrespondingSourceObject: {fileID: 0} 507 | m_PrefabInstance: {fileID: 0} 508 | m_PrefabAsset: {fileID: 0} 509 | m_GameObject: {fileID: 1415507575} 510 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 511 | --- !u!4 &1415507580 512 | Transform: 513 | m_ObjectHideFlags: 0 514 | m_CorrespondingSourceObject: {fileID: 0} 515 | m_PrefabInstance: {fileID: 0} 516 | m_PrefabAsset: {fileID: 0} 517 | m_GameObject: {fileID: 1415507575} 518 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 519 | m_LocalPosition: {x: 0.015709877, y: 0.040486515, z: 0} 520 | m_LocalScale: {x: 1, y: 1, z: 1} 521 | m_ConstrainProportionsScale: 0 522 | m_Children: [] 523 | m_Father: {fileID: 0} 524 | m_RootOrder: 4 525 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 526 | -------------------------------------------------------------------------------- /unityapp/Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unityapp/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 504e7bd1401274cfb96880cab5902c3a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unityapp/Assets/Scripts/API.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Runtime.InteropServices; 5 | using UnityEngine.UI; 6 | using UnityEngine; 7 | using AOT; 8 | using Newtonsoft.Json; 9 | 10 | /// 11 | /// C-API exposed by the Host, i.e., Unity -> Host API. 12 | /// 13 | public class HostNativeAPI { 14 | public delegate void TestDelegate(string name); 15 | 16 | [DllImport("__Internal")] 17 | public static extern void sendUnityStateUpdate(string state); 18 | 19 | [DllImport("__Internal")] 20 | public static extern void setTestDelegate(TestDelegate cb); 21 | } 22 | 23 | /// 24 | /// C-API exposed by Unity, i.e., Host -> Unity API. 25 | /// 26 | public class UnityNativeAPI { 27 | 28 | [MonoPInvokeCallback(typeof(HostNativeAPI.TestDelegate))] 29 | public static void test(string name) { 30 | Debug.Log("This static function has been called from iOS!"); 31 | Debug.Log(name); 32 | } 33 | 34 | } 35 | 36 | /// 37 | /// This structure holds the type of an incoming message. 38 | /// Based on the type, we will parse the extra provided data. 39 | /// 40 | public struct Message 41 | { 42 | public string type; 43 | } 44 | 45 | /// 46 | /// This structure holds the type of an incoming message, as well 47 | /// as some data. 48 | /// 49 | public struct MessageWithData 50 | { 51 | [JsonProperty(Required = Newtonsoft.Json.Required.AllowNull)] 52 | public string type; 53 | 54 | [JsonProperty(Required = Newtonsoft.Json.Required.AllowNull)] 55 | public T data; 56 | } 57 | 58 | public class API : MonoBehaviour 59 | { 60 | public GameObject cube; 61 | 62 | void Start() 63 | { 64 | #if UNITY_IOS 65 | if (Application.platform == RuntimePlatform.IPhonePlayer) { 66 | HostNativeAPI.setTestDelegate(UnityNativeAPI.test); 67 | HostNativeAPI.sendUnityStateUpdate("ready"); 68 | } 69 | #endif 70 | } 71 | 72 | void ReceiveMessage(string serializedMessage) 73 | { 74 | var header = JsonConvert.DeserializeObject(serializedMessage); 75 | switch (header.type) { 76 | case "change-color": 77 | _UpdateCubeColor(serializedMessage); 78 | break; 79 | default: 80 | Debug.LogError("Unrecognized message '" + header.type + "'"); 81 | break; 82 | } 83 | } 84 | 85 | private void _UpdateCubeColor(string serialized) 86 | { 87 | var msg = JsonConvert.DeserializeObject>(serialized); 88 | if (msg.data != null && msg.data.Length >= 3) 89 | { 90 | var color = new Color(msg.data[0], msg.data[1], msg.data[2]); 91 | Debug.Log("Setting Color = " + color); 92 | var material = cube.GetComponent()?.sharedMaterial; 93 | material?.SetColor("_Color", color); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /unityapp/Assets/Scripts/API.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10890956554ef4ccf9e3891a21d59cff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unityapp/Assets/Scripts/AutoRotate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AutoRotate : MonoBehaviour 6 | { 7 | // Update is called once per frame 8 | void Update() 9 | { 10 | if (Input.touchCount == 0) 11 | { 12 | transform.Rotate(0.0f, Time.deltaTime * 50.0f, 0.0f); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /unityapp/Assets/Scripts/AutoRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e57fc7659a26142d083679a65fdc0f88 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unityapp/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.15.4", 4 | "com.unity.ide.rider": "3.0.7", 5 | "com.unity.ide.visualstudio": "2.0.12", 6 | "com.unity.ide.vscode": "1.2.4", 7 | "com.unity.test-framework": "1.1.29", 8 | "com.unity.textmeshpro": "3.0.6", 9 | "com.unity.timeline": "1.6.3", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /unityapp/Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": { 4 | "version": "1.15.4", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.nuget.newtonsoft-json": "2.0.0", 9 | "com.unity.services.core": "1.0.1" 10 | }, 11 | "url": "https://packages.unity.com" 12 | }, 13 | "com.unity.ext.nunit": { 14 | "version": "1.0.6", 15 | "depth": 1, 16 | "source": "registry", 17 | "dependencies": {}, 18 | "url": "https://packages.unity.com" 19 | }, 20 | "com.unity.ide.rider": { 21 | "version": "3.0.7", 22 | "depth": 0, 23 | "source": "registry", 24 | "dependencies": { 25 | "com.unity.ext.nunit": "1.0.6" 26 | }, 27 | "url": "https://packages.unity.com" 28 | }, 29 | "com.unity.ide.visualstudio": { 30 | "version": "2.0.12", 31 | "depth": 0, 32 | "source": "registry", 33 | "dependencies": { 34 | "com.unity.test-framework": "1.1.9" 35 | }, 36 | "url": "https://packages.unity.com" 37 | }, 38 | "com.unity.ide.vscode": { 39 | "version": "1.2.4", 40 | "depth": 0, 41 | "source": "registry", 42 | "dependencies": {}, 43 | "url": "https://packages.unity.com" 44 | }, 45 | "com.unity.nuget.newtonsoft-json": { 46 | "version": "2.0.0", 47 | "depth": 1, 48 | "source": "registry", 49 | "dependencies": {}, 50 | "url": "https://packages.unity.com" 51 | }, 52 | "com.unity.services.core": { 53 | "version": "1.0.1", 54 | "depth": 1, 55 | "source": "registry", 56 | "dependencies": { 57 | "com.unity.modules.unitywebrequest": "1.0.0" 58 | }, 59 | "url": "https://packages.unity.com" 60 | }, 61 | "com.unity.test-framework": { 62 | "version": "1.1.29", 63 | "depth": 0, 64 | "source": "registry", 65 | "dependencies": { 66 | "com.unity.ext.nunit": "1.0.6", 67 | "com.unity.modules.imgui": "1.0.0", 68 | "com.unity.modules.jsonserialize": "1.0.0" 69 | }, 70 | "url": "https://packages.unity.com" 71 | }, 72 | "com.unity.textmeshpro": { 73 | "version": "3.0.6", 74 | "depth": 0, 75 | "source": "registry", 76 | "dependencies": { 77 | "com.unity.ugui": "1.0.0" 78 | }, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.timeline": { 82 | "version": "1.6.3", 83 | "depth": 0, 84 | "source": "registry", 85 | "dependencies": { 86 | "com.unity.modules.director": "1.0.0", 87 | "com.unity.modules.animation": "1.0.0", 88 | "com.unity.modules.audio": "1.0.0", 89 | "com.unity.modules.particlesystem": "1.0.0" 90 | }, 91 | "url": "https://packages.unity.com" 92 | }, 93 | "com.unity.ugui": { 94 | "version": "1.0.0", 95 | "depth": 0, 96 | "source": "builtin", 97 | "dependencies": { 98 | "com.unity.modules.ui": "1.0.0", 99 | "com.unity.modules.imgui": "1.0.0" 100 | } 101 | }, 102 | "com.unity.modules.ai": { 103 | "version": "1.0.0", 104 | "depth": 0, 105 | "source": "builtin", 106 | "dependencies": {} 107 | }, 108 | "com.unity.modules.androidjni": { 109 | "version": "1.0.0", 110 | "depth": 0, 111 | "source": "builtin", 112 | "dependencies": {} 113 | }, 114 | "com.unity.modules.animation": { 115 | "version": "1.0.0", 116 | "depth": 0, 117 | "source": "builtin", 118 | "dependencies": {} 119 | }, 120 | "com.unity.modules.assetbundle": { 121 | "version": "1.0.0", 122 | "depth": 0, 123 | "source": "builtin", 124 | "dependencies": {} 125 | }, 126 | "com.unity.modules.audio": { 127 | "version": "1.0.0", 128 | "depth": 0, 129 | "source": "builtin", 130 | "dependencies": {} 131 | }, 132 | "com.unity.modules.cloth": { 133 | "version": "1.0.0", 134 | "depth": 0, 135 | "source": "builtin", 136 | "dependencies": { 137 | "com.unity.modules.physics": "1.0.0" 138 | } 139 | }, 140 | "com.unity.modules.director": { 141 | "version": "1.0.0", 142 | "depth": 0, 143 | "source": "builtin", 144 | "dependencies": { 145 | "com.unity.modules.audio": "1.0.0", 146 | "com.unity.modules.animation": "1.0.0" 147 | } 148 | }, 149 | "com.unity.modules.imageconversion": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": {} 154 | }, 155 | "com.unity.modules.imgui": { 156 | "version": "1.0.0", 157 | "depth": 0, 158 | "source": "builtin", 159 | "dependencies": {} 160 | }, 161 | "com.unity.modules.jsonserialize": { 162 | "version": "1.0.0", 163 | "depth": 0, 164 | "source": "builtin", 165 | "dependencies": {} 166 | }, 167 | "com.unity.modules.particlesystem": { 168 | "version": "1.0.0", 169 | "depth": 0, 170 | "source": "builtin", 171 | "dependencies": {} 172 | }, 173 | "com.unity.modules.physics": { 174 | "version": "1.0.0", 175 | "depth": 0, 176 | "source": "builtin", 177 | "dependencies": {} 178 | }, 179 | "com.unity.modules.physics2d": { 180 | "version": "1.0.0", 181 | "depth": 0, 182 | "source": "builtin", 183 | "dependencies": {} 184 | }, 185 | "com.unity.modules.screencapture": { 186 | "version": "1.0.0", 187 | "depth": 0, 188 | "source": "builtin", 189 | "dependencies": { 190 | "com.unity.modules.imageconversion": "1.0.0" 191 | } 192 | }, 193 | "com.unity.modules.subsystems": { 194 | "version": "1.0.0", 195 | "depth": 1, 196 | "source": "builtin", 197 | "dependencies": { 198 | "com.unity.modules.jsonserialize": "1.0.0" 199 | } 200 | }, 201 | "com.unity.modules.terrain": { 202 | "version": "1.0.0", 203 | "depth": 0, 204 | "source": "builtin", 205 | "dependencies": {} 206 | }, 207 | "com.unity.modules.terrainphysics": { 208 | "version": "1.0.0", 209 | "depth": 0, 210 | "source": "builtin", 211 | "dependencies": { 212 | "com.unity.modules.physics": "1.0.0", 213 | "com.unity.modules.terrain": "1.0.0" 214 | } 215 | }, 216 | "com.unity.modules.tilemap": { 217 | "version": "1.0.0", 218 | "depth": 0, 219 | "source": "builtin", 220 | "dependencies": { 221 | "com.unity.modules.physics2d": "1.0.0" 222 | } 223 | }, 224 | "com.unity.modules.ui": { 225 | "version": "1.0.0", 226 | "depth": 0, 227 | "source": "builtin", 228 | "dependencies": {} 229 | }, 230 | "com.unity.modules.uielements": { 231 | "version": "1.0.0", 232 | "depth": 0, 233 | "source": "builtin", 234 | "dependencies": { 235 | "com.unity.modules.ui": "1.0.0", 236 | "com.unity.modules.imgui": "1.0.0", 237 | "com.unity.modules.jsonserialize": "1.0.0", 238 | "com.unity.modules.uielementsnative": "1.0.0" 239 | } 240 | }, 241 | "com.unity.modules.uielementsnative": { 242 | "version": "1.0.0", 243 | "depth": 1, 244 | "source": "builtin", 245 | "dependencies": { 246 | "com.unity.modules.ui": "1.0.0", 247 | "com.unity.modules.imgui": "1.0.0", 248 | "com.unity.modules.jsonserialize": "1.0.0" 249 | } 250 | }, 251 | "com.unity.modules.umbra": { 252 | "version": "1.0.0", 253 | "depth": 0, 254 | "source": "builtin", 255 | "dependencies": {} 256 | }, 257 | "com.unity.modules.unityanalytics": { 258 | "version": "1.0.0", 259 | "depth": 0, 260 | "source": "builtin", 261 | "dependencies": { 262 | "com.unity.modules.unitywebrequest": "1.0.0", 263 | "com.unity.modules.jsonserialize": "1.0.0" 264 | } 265 | }, 266 | "com.unity.modules.unitywebrequest": { 267 | "version": "1.0.0", 268 | "depth": 0, 269 | "source": "builtin", 270 | "dependencies": {} 271 | }, 272 | "com.unity.modules.unitywebrequestassetbundle": { 273 | "version": "1.0.0", 274 | "depth": 0, 275 | "source": "builtin", 276 | "dependencies": { 277 | "com.unity.modules.assetbundle": "1.0.0", 278 | "com.unity.modules.unitywebrequest": "1.0.0" 279 | } 280 | }, 281 | "com.unity.modules.unitywebrequestaudio": { 282 | "version": "1.0.0", 283 | "depth": 0, 284 | "source": "builtin", 285 | "dependencies": { 286 | "com.unity.modules.unitywebrequest": "1.0.0", 287 | "com.unity.modules.audio": "1.0.0" 288 | } 289 | }, 290 | "com.unity.modules.unitywebrequesttexture": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.unitywebrequest": "1.0.0", 296 | "com.unity.modules.imageconversion": "1.0.0" 297 | } 298 | }, 299 | "com.unity.modules.unitywebrequestwww": { 300 | "version": "1.0.0", 301 | "depth": 0, 302 | "source": "builtin", 303 | "dependencies": { 304 | "com.unity.modules.unitywebrequest": "1.0.0", 305 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 306 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 307 | "com.unity.modules.audio": "1.0.0", 308 | "com.unity.modules.assetbundle": "1.0.0", 309 | "com.unity.modules.imageconversion": "1.0.0" 310 | } 311 | }, 312 | "com.unity.modules.vehicles": { 313 | "version": "1.0.0", 314 | "depth": 0, 315 | "source": "builtin", 316 | "dependencies": { 317 | "com.unity.modules.physics": "1.0.0" 318 | } 319 | }, 320 | "com.unity.modules.video": { 321 | "version": "1.0.0", 322 | "depth": 0, 323 | "source": "builtin", 324 | "dependencies": { 325 | "com.unity.modules.audio": "1.0.0", 326 | "com.unity.modules.ui": "1.0.0", 327 | "com.unity.modules.unitywebrequest": "1.0.0" 328 | } 329 | }, 330 | "com.unity.modules.vr": { 331 | "version": "1.0.0", 332 | "depth": 0, 333 | "source": "builtin", 334 | "dependencies": { 335 | "com.unity.modules.jsonserialize": "1.0.0", 336 | "com.unity.modules.physics": "1.0.0", 337 | "com.unity.modules.xr": "1.0.0" 338 | } 339 | }, 340 | "com.unity.modules.wind": { 341 | "version": "1.0.0", 342 | "depth": 0, 343 | "source": "builtin", 344 | "dependencies": {} 345 | }, 346 | "com.unity.modules.xr": { 347 | "version": "1.0.0", 348 | "depth": 0, 349 | "source": "builtin", 350 | "dependencies": { 351 | "com.unity.modules.physics": "1.0.0", 352 | "com.unity.modules.jsonserialize": "1.0.0", 353 | "com.unity.modules.subsystems": "1.0.0" 354 | } 355 | } 356 | } 357 | } 358 | -------------------------------------------------------------------------------- /unityapp/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: 1024 20 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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: 11 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 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /unityapp/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 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 9fc0d4010bbf28b4594072e72b8655ab 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /unityapp/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: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 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;rsp;asmref 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_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /unityapp/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 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 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 | -------------------------------------------------------------------------------- /unityapp/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: 1 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 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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: 23 7 | productGUID: 40b45f034f0b54c0e825683d54a80a74 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: unityapp 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: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 1 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 1 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 0 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 0.1 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | useHDRDisplay: 0 149 | D3DHDRBitDepth: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | androidSupportedAspectRatio: 1 154 | androidMaxAspectRatio: 2.1 155 | applicationIdentifier: 156 | iPhone: com.DefaultCompany.unityapp 157 | buildNumber: 158 | Standalone: 0 159 | iPhone: 0 160 | tvOS: 0 161 | overrideDefaultApplicationIdentifier: 0 162 | AndroidBundleVersionCode: 1 163 | AndroidMinSdkVersion: 22 164 | AndroidTargetSdkVersion: 0 165 | AndroidPreferredInstallLocation: 1 166 | aotOptions: 167 | stripEngineCode: 1 168 | iPhoneStrippingLevel: 0 169 | iPhoneScriptCallOptimization: 0 170 | ForceInternetPermission: 0 171 | ForceSDCardPermission: 0 172 | CreateWallpaper: 0 173 | APKExpansionFiles: 0 174 | keepLoadedShadersAlive: 0 175 | StripUnusedMeshComponents: 1 176 | VertexChannelCompressionMask: 4054 177 | iPhoneSdkVersion: 988 178 | iOSTargetOSVersionString: 11.0 179 | tvOSSdkVersion: 0 180 | tvOSRequireExtendedGameController: 0 181 | tvOSTargetOSVersionString: 11.0 182 | uIPrerenderedIcon: 0 183 | uIRequiresPersistentWiFi: 0 184 | uIRequiresFullScreen: 1 185 | uIStatusBarHidden: 1 186 | uIExitOnSuspend: 0 187 | uIStatusBarStyle: 0 188 | appleTVSplashScreen: {fileID: 0} 189 | appleTVSplashScreen2x: {fileID: 0} 190 | tvOSSmallIconLayers: [] 191 | tvOSSmallIconLayers2x: [] 192 | tvOSLargeIconLayers: [] 193 | tvOSLargeIconLayers2x: [] 194 | tvOSTopShelfImageLayers: [] 195 | tvOSTopShelfImageLayers2x: [] 196 | tvOSTopShelfImageWideLayers: [] 197 | tvOSTopShelfImageWideLayers2x: [] 198 | iOSLaunchScreenType: 0 199 | iOSLaunchScreenPortrait: {fileID: 0} 200 | iOSLaunchScreenLandscape: {fileID: 0} 201 | iOSLaunchScreenBackgroundColor: 202 | serializedVersion: 2 203 | rgba: 0 204 | iOSLaunchScreenFillPct: 100 205 | iOSLaunchScreenSize: 100 206 | iOSLaunchScreenCustomXibPath: 207 | iOSLaunchScreeniPadType: 0 208 | iOSLaunchScreeniPadImage: {fileID: 0} 209 | iOSLaunchScreeniPadBackgroundColor: 210 | serializedVersion: 2 211 | rgba: 0 212 | iOSLaunchScreeniPadFillPct: 100 213 | iOSLaunchScreeniPadSize: 100 214 | iOSLaunchScreeniPadCustomXibPath: 215 | iOSLaunchScreenCustomStoryboardPath: 216 | iOSLaunchScreeniPadCustomStoryboardPath: 217 | iOSDeviceRequirements: [] 218 | iOSURLSchemes: [] 219 | macOSURLSchemes: [] 220 | iOSBackgroundModes: 0 221 | iOSMetalForceHardShadows: 0 222 | metalEditorSupport: 1 223 | metalAPIValidation: 1 224 | iOSRenderExtraFrameOnPause: 0 225 | iosCopyPluginsCodeInsteadOfSymlink: 0 226 | appleDeveloperTeamID: 227 | iOSManualSigningProvisioningProfileID: 228 | tvOSManualSigningProvisioningProfileID: 229 | iOSManualSigningProvisioningProfileType: 0 230 | tvOSManualSigningProvisioningProfileType: 0 231 | appleEnableAutomaticSigning: 0 232 | iOSRequireARKit: 0 233 | iOSAutomaticallyDetectAndAddCapabilities: 1 234 | appleEnableProMotion: 0 235 | shaderPrecisionModel: 0 236 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 237 | templatePackageId: com.unity.template.3d@5.0.4 238 | templateDefaultScene: Assets/Scenes/SampleScene.unity 239 | useCustomMainManifest: 0 240 | useCustomLauncherManifest: 0 241 | useCustomMainGradleTemplate: 0 242 | useCustomLauncherGradleManifest: 0 243 | useCustomBaseGradleTemplate: 0 244 | useCustomGradlePropertiesTemplate: 0 245 | useCustomProguardFile: 0 246 | AndroidTargetArchitectures: 1 247 | AndroidTargetDevices: 0 248 | AndroidSplashScreenScale: 0 249 | androidSplashScreen: {fileID: 0} 250 | AndroidKeystoreName: 251 | AndroidKeyaliasName: 252 | AndroidBuildApkPerCpuArchitecture: 0 253 | AndroidTVCompatibility: 0 254 | AndroidIsGame: 1 255 | AndroidEnableTango: 0 256 | androidEnableBanner: 1 257 | androidUseLowAccuracyLocation: 0 258 | androidUseCustomKeystore: 0 259 | m_AndroidBanners: 260 | - width: 320 261 | height: 180 262 | banner: {fileID: 0} 263 | androidGamepadSupportLevel: 0 264 | chromeosInputEmulation: 1 265 | AndroidMinifyWithR8: 0 266 | AndroidMinifyRelease: 0 267 | AndroidMinifyDebug: 0 268 | AndroidValidateAppBundleSize: 1 269 | AndroidAppBundleSizeToValidate: 150 270 | m_BuildTargetIcons: [] 271 | m_BuildTargetPlatformIcons: 272 | - m_BuildTarget: iPhone 273 | m_Icons: 274 | - m_Textures: [] 275 | m_Width: 180 276 | m_Height: 180 277 | m_Kind: 0 278 | m_SubKind: iPhone 279 | - m_Textures: [] 280 | m_Width: 120 281 | m_Height: 120 282 | m_Kind: 0 283 | m_SubKind: iPhone 284 | - m_Textures: [] 285 | m_Width: 167 286 | m_Height: 167 287 | m_Kind: 0 288 | m_SubKind: iPad 289 | - m_Textures: [] 290 | m_Width: 152 291 | m_Height: 152 292 | m_Kind: 0 293 | m_SubKind: iPad 294 | - m_Textures: [] 295 | m_Width: 76 296 | m_Height: 76 297 | m_Kind: 0 298 | m_SubKind: iPad 299 | - m_Textures: [] 300 | m_Width: 120 301 | m_Height: 120 302 | m_Kind: 3 303 | m_SubKind: iPhone 304 | - m_Textures: [] 305 | m_Width: 80 306 | m_Height: 80 307 | m_Kind: 3 308 | m_SubKind: iPhone 309 | - m_Textures: [] 310 | m_Width: 80 311 | m_Height: 80 312 | m_Kind: 3 313 | m_SubKind: iPad 314 | - m_Textures: [] 315 | m_Width: 40 316 | m_Height: 40 317 | m_Kind: 3 318 | m_SubKind: iPad 319 | - m_Textures: [] 320 | m_Width: 87 321 | m_Height: 87 322 | m_Kind: 1 323 | m_SubKind: iPhone 324 | - m_Textures: [] 325 | m_Width: 58 326 | m_Height: 58 327 | m_Kind: 1 328 | m_SubKind: iPhone 329 | - m_Textures: [] 330 | m_Width: 29 331 | m_Height: 29 332 | m_Kind: 1 333 | m_SubKind: iPhone 334 | - m_Textures: [] 335 | m_Width: 58 336 | m_Height: 58 337 | m_Kind: 1 338 | m_SubKind: iPad 339 | - m_Textures: [] 340 | m_Width: 29 341 | m_Height: 29 342 | m_Kind: 1 343 | m_SubKind: iPad 344 | - m_Textures: [] 345 | m_Width: 60 346 | m_Height: 60 347 | m_Kind: 2 348 | m_SubKind: iPhone 349 | - m_Textures: [] 350 | m_Width: 40 351 | m_Height: 40 352 | m_Kind: 2 353 | m_SubKind: iPhone 354 | - m_Textures: [] 355 | m_Width: 40 356 | m_Height: 40 357 | m_Kind: 2 358 | m_SubKind: iPad 359 | - m_Textures: [] 360 | m_Width: 20 361 | m_Height: 20 362 | m_Kind: 2 363 | m_SubKind: iPad 364 | - m_Textures: [] 365 | m_Width: 1024 366 | m_Height: 1024 367 | m_Kind: 4 368 | m_SubKind: App Store 369 | m_BuildTargetBatching: 370 | - m_BuildTarget: Standalone 371 | m_StaticBatching: 1 372 | m_DynamicBatching: 0 373 | - m_BuildTarget: tvOS 374 | m_StaticBatching: 1 375 | m_DynamicBatching: 0 376 | - m_BuildTarget: Android 377 | m_StaticBatching: 1 378 | m_DynamicBatching: 0 379 | - m_BuildTarget: iPhone 380 | m_StaticBatching: 1 381 | m_DynamicBatching: 0 382 | - m_BuildTarget: WebGL 383 | m_StaticBatching: 0 384 | m_DynamicBatching: 0 385 | m_BuildTargetGraphicsJobs: 386 | - m_BuildTarget: MacStandaloneSupport 387 | m_GraphicsJobs: 0 388 | - m_BuildTarget: Switch 389 | m_GraphicsJobs: 1 390 | - m_BuildTarget: MetroSupport 391 | m_GraphicsJobs: 1 392 | - m_BuildTarget: AppleTVSupport 393 | m_GraphicsJobs: 0 394 | - m_BuildTarget: BJMSupport 395 | m_GraphicsJobs: 1 396 | - m_BuildTarget: LinuxStandaloneSupport 397 | m_GraphicsJobs: 1 398 | - m_BuildTarget: PS4Player 399 | m_GraphicsJobs: 1 400 | - m_BuildTarget: iOSSupport 401 | m_GraphicsJobs: 0 402 | - m_BuildTarget: WindowsStandaloneSupport 403 | m_GraphicsJobs: 1 404 | - m_BuildTarget: XboxOnePlayer 405 | m_GraphicsJobs: 1 406 | - m_BuildTarget: LuminSupport 407 | m_GraphicsJobs: 0 408 | - m_BuildTarget: AndroidPlayer 409 | m_GraphicsJobs: 0 410 | - m_BuildTarget: WebGLSupport 411 | m_GraphicsJobs: 0 412 | m_BuildTargetGraphicsJobMode: 413 | - m_BuildTarget: PS4Player 414 | m_GraphicsJobMode: 0 415 | - m_BuildTarget: XboxOnePlayer 416 | m_GraphicsJobMode: 0 417 | m_BuildTargetGraphicsAPIs: 418 | - m_BuildTarget: AndroidPlayer 419 | m_APIs: 150000000b000000 420 | m_Automatic: 1 421 | - m_BuildTarget: iOSSupport 422 | m_APIs: 10000000 423 | m_Automatic: 1 424 | - m_BuildTarget: AppleTVSupport 425 | m_APIs: 10000000 426 | m_Automatic: 1 427 | - m_BuildTarget: WebGLSupport 428 | m_APIs: 0b000000 429 | m_Automatic: 1 430 | m_BuildTargetVRSettings: 431 | - m_BuildTarget: Standalone 432 | m_Enabled: 0 433 | m_Devices: 434 | - Oculus 435 | - OpenVR 436 | openGLRequireES31: 0 437 | openGLRequireES31AEP: 0 438 | openGLRequireES32: 0 439 | m_TemplateCustomTags: {} 440 | mobileMTRendering: 441 | Android: 1 442 | iPhone: 1 443 | tvOS: 1 444 | m_BuildTargetGroupLightmapEncodingQuality: [] 445 | m_BuildTargetGroupLightmapSettings: [] 446 | m_BuildTargetNormalMapEncoding: [] 447 | m_BuildTargetDefaultTextureCompressionFormat: [] 448 | playModeTestRunnerEnabled: 0 449 | runPlayModeTestAsEditModeTest: 0 450 | actionOnDotNetUnhandledException: 1 451 | enableInternalProfiler: 0 452 | logObjCUncaughtExceptions: 1 453 | enableCrashReportAPI: 0 454 | cameraUsageDescription: 455 | locationUsageDescription: 456 | microphoneUsageDescription: 457 | bluetoothUsageDescription: 458 | switchNMETAOverride: 459 | switchNetLibKey: 460 | switchSocketMemoryPoolSize: 6144 461 | switchSocketAllocatorPoolSize: 128 462 | switchSocketConcurrencyLimit: 14 463 | switchScreenResolutionBehavior: 2 464 | switchUseCPUProfiler: 0 465 | switchUseGOLDLinker: 0 466 | switchLTOSetting: 0 467 | switchApplicationID: 0x01004b9000490000 468 | switchNSODependencies: 469 | switchTitleNames_0: 470 | switchTitleNames_1: 471 | switchTitleNames_2: 472 | switchTitleNames_3: 473 | switchTitleNames_4: 474 | switchTitleNames_5: 475 | switchTitleNames_6: 476 | switchTitleNames_7: 477 | switchTitleNames_8: 478 | switchTitleNames_9: 479 | switchTitleNames_10: 480 | switchTitleNames_11: 481 | switchTitleNames_12: 482 | switchTitleNames_13: 483 | switchTitleNames_14: 484 | switchTitleNames_15: 485 | switchPublisherNames_0: 486 | switchPublisherNames_1: 487 | switchPublisherNames_2: 488 | switchPublisherNames_3: 489 | switchPublisherNames_4: 490 | switchPublisherNames_5: 491 | switchPublisherNames_6: 492 | switchPublisherNames_7: 493 | switchPublisherNames_8: 494 | switchPublisherNames_9: 495 | switchPublisherNames_10: 496 | switchPublisherNames_11: 497 | switchPublisherNames_12: 498 | switchPublisherNames_13: 499 | switchPublisherNames_14: 500 | switchPublisherNames_15: 501 | switchIcons_0: {fileID: 0} 502 | switchIcons_1: {fileID: 0} 503 | switchIcons_2: {fileID: 0} 504 | switchIcons_3: {fileID: 0} 505 | switchIcons_4: {fileID: 0} 506 | switchIcons_5: {fileID: 0} 507 | switchIcons_6: {fileID: 0} 508 | switchIcons_7: {fileID: 0} 509 | switchIcons_8: {fileID: 0} 510 | switchIcons_9: {fileID: 0} 511 | switchIcons_10: {fileID: 0} 512 | switchIcons_11: {fileID: 0} 513 | switchIcons_12: {fileID: 0} 514 | switchIcons_13: {fileID: 0} 515 | switchIcons_14: {fileID: 0} 516 | switchIcons_15: {fileID: 0} 517 | switchSmallIcons_0: {fileID: 0} 518 | switchSmallIcons_1: {fileID: 0} 519 | switchSmallIcons_2: {fileID: 0} 520 | switchSmallIcons_3: {fileID: 0} 521 | switchSmallIcons_4: {fileID: 0} 522 | switchSmallIcons_5: {fileID: 0} 523 | switchSmallIcons_6: {fileID: 0} 524 | switchSmallIcons_7: {fileID: 0} 525 | switchSmallIcons_8: {fileID: 0} 526 | switchSmallIcons_9: {fileID: 0} 527 | switchSmallIcons_10: {fileID: 0} 528 | switchSmallIcons_11: {fileID: 0} 529 | switchSmallIcons_12: {fileID: 0} 530 | switchSmallIcons_13: {fileID: 0} 531 | switchSmallIcons_14: {fileID: 0} 532 | switchSmallIcons_15: {fileID: 0} 533 | switchManualHTML: 534 | switchAccessibleURLs: 535 | switchLegalInformation: 536 | switchMainThreadStackSize: 1048576 537 | switchPresenceGroupId: 538 | switchLogoHandling: 0 539 | switchReleaseVersion: 0 540 | switchDisplayVersion: 1.0.0 541 | switchStartupUserAccount: 0 542 | switchTouchScreenUsage: 0 543 | switchSupportedLanguagesMask: 0 544 | switchLogoType: 0 545 | switchApplicationErrorCodeCategory: 546 | switchUserAccountSaveDataSize: 0 547 | switchUserAccountSaveDataJournalSize: 0 548 | switchApplicationAttribute: 0 549 | switchCardSpecSize: -1 550 | switchCardSpecClock: -1 551 | switchRatingsMask: 0 552 | switchRatingsInt_0: 0 553 | switchRatingsInt_1: 0 554 | switchRatingsInt_2: 0 555 | switchRatingsInt_3: 0 556 | switchRatingsInt_4: 0 557 | switchRatingsInt_5: 0 558 | switchRatingsInt_6: 0 559 | switchRatingsInt_7: 0 560 | switchRatingsInt_8: 0 561 | switchRatingsInt_9: 0 562 | switchRatingsInt_10: 0 563 | switchRatingsInt_11: 0 564 | switchRatingsInt_12: 0 565 | switchLocalCommunicationIds_0: 566 | switchLocalCommunicationIds_1: 567 | switchLocalCommunicationIds_2: 568 | switchLocalCommunicationIds_3: 569 | switchLocalCommunicationIds_4: 570 | switchLocalCommunicationIds_5: 571 | switchLocalCommunicationIds_6: 572 | switchLocalCommunicationIds_7: 573 | switchParentalControl: 0 574 | switchAllowsScreenshot: 1 575 | switchAllowsVideoCapturing: 1 576 | switchAllowsRuntimeAddOnContentInstall: 0 577 | switchDataLossConfirmation: 0 578 | switchUserAccountLockEnabled: 0 579 | switchSystemResourceMemory: 16777216 580 | switchSupportedNpadStyles: 22 581 | switchNativeFsCacheSize: 32 582 | switchIsHoldTypeHorizontal: 0 583 | switchSupportedNpadCount: 8 584 | switchSocketConfigEnabled: 0 585 | switchTcpInitialSendBufferSize: 32 586 | switchTcpInitialReceiveBufferSize: 64 587 | switchTcpAutoSendBufferSizeMax: 256 588 | switchTcpAutoReceiveBufferSizeMax: 256 589 | switchUdpSendBufferSize: 9 590 | switchUdpReceiveBufferSize: 42 591 | switchSocketBufferEfficiency: 4 592 | switchSocketInitializeEnabled: 1 593 | switchNetworkInterfaceManagerInitializeEnabled: 1 594 | switchPlayerConnectionEnabled: 1 595 | switchUseNewStyleFilepaths: 0 596 | switchUseMicroSleepForYield: 1 597 | switchEnableRamDiskSupport: 0 598 | switchMicroSleepForYieldTime: 25 599 | switchRamDiskSpaceSize: 12 600 | ps4NPAgeRating: 12 601 | ps4NPTitleSecret: 602 | ps4NPTrophyPackPath: 603 | ps4ParentalLevel: 11 604 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 605 | ps4Category: 0 606 | ps4MasterVersion: 01.00 607 | ps4AppVersion: 01.00 608 | ps4AppType: 0 609 | ps4ParamSfxPath: 610 | ps4VideoOutPixelFormat: 0 611 | ps4VideoOutInitialWidth: 1920 612 | ps4VideoOutBaseModeInitialWidth: 1920 613 | ps4VideoOutReprojectionRate: 60 614 | ps4PronunciationXMLPath: 615 | ps4PronunciationSIGPath: 616 | ps4BackgroundImagePath: 617 | ps4StartupImagePath: 618 | ps4StartupImagesFolder: 619 | ps4IconImagesFolder: 620 | ps4SaveDataImagePath: 621 | ps4SdkOverride: 622 | ps4BGMPath: 623 | ps4ShareFilePath: 624 | ps4ShareOverlayImagePath: 625 | ps4PrivacyGuardImagePath: 626 | ps4ExtraSceSysFile: 627 | ps4NPtitleDatPath: 628 | ps4RemotePlayKeyAssignment: -1 629 | ps4RemotePlayKeyMappingDir: 630 | ps4PlayTogetherPlayerCount: 0 631 | ps4EnterButtonAssignment: 1 632 | ps4ApplicationParam1: 0 633 | ps4ApplicationParam2: 0 634 | ps4ApplicationParam3: 0 635 | ps4ApplicationParam4: 0 636 | ps4DownloadDataSize: 0 637 | ps4GarlicHeapSize: 2048 638 | ps4ProGarlicHeapSize: 2560 639 | playerPrefsMaxSize: 32768 640 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 641 | ps4pnSessions: 1 642 | ps4pnPresence: 1 643 | ps4pnFriends: 1 644 | ps4pnGameCustomData: 1 645 | playerPrefsSupport: 0 646 | enableApplicationExit: 0 647 | resetTempFolder: 1 648 | restrictedAudioUsageRights: 0 649 | ps4UseResolutionFallback: 0 650 | ps4ReprojectionSupport: 0 651 | ps4UseAudio3dBackend: 0 652 | ps4UseLowGarlicFragmentationMode: 1 653 | ps4SocialScreenEnabled: 0 654 | ps4ScriptOptimizationLevel: 0 655 | ps4Audio3dVirtualSpeakerCount: 14 656 | ps4attribCpuUsage: 0 657 | ps4PatchPkgPath: 658 | ps4PatchLatestPkgPath: 659 | ps4PatchChangeinfoPath: 660 | ps4PatchDayOne: 0 661 | ps4attribUserManagement: 0 662 | ps4attribMoveSupport: 0 663 | ps4attrib3DSupport: 0 664 | ps4attribShareSupport: 0 665 | ps4attribExclusiveVR: 0 666 | ps4disableAutoHideSplash: 0 667 | ps4videoRecordingFeaturesUsed: 0 668 | ps4contentSearchFeaturesUsed: 0 669 | ps4CompatibilityPS5: 0 670 | ps4GPU800MHz: 1 671 | ps4attribEyeToEyeDistanceSettingVR: 0 672 | ps4IncludedModules: [] 673 | ps4attribVROutputEnabled: 0 674 | monoEnv: 675 | splashScreenBackgroundSourceLandscape: {fileID: 0} 676 | splashScreenBackgroundSourcePortrait: {fileID: 0} 677 | blurSplashScreenBackground: 1 678 | spritePackerPolicy: 679 | webGLMemorySize: 16 680 | webGLExceptionSupport: 1 681 | webGLNameFilesAsHashes: 0 682 | webGLDataCaching: 1 683 | webGLDebugSymbols: 0 684 | webGLEmscriptenArgs: 685 | webGLModulesDirectory: 686 | webGLTemplate: APPLICATION:Default 687 | webGLAnalyzeBuildSize: 0 688 | webGLUseEmbeddedResources: 0 689 | webGLCompressionFormat: 1 690 | webGLWasmArithmeticExceptions: 0 691 | webGLLinkerTarget: 1 692 | webGLThreadsSupport: 0 693 | webGLDecompressionFallback: 0 694 | scriptingDefineSymbols: {} 695 | additionalCompilerArguments: {} 696 | platformArchitecture: {} 697 | scriptingBackend: {} 698 | il2cppCompilerConfiguration: {} 699 | managedStrippingLevel: {} 700 | incrementalIl2cppBuild: {} 701 | suppressCommonWarnings: 1 702 | allowUnsafeCode: 0 703 | useDeterministicCompilation: 1 704 | enableRoslynAnalyzers: 1 705 | additionalIl2CppArgs: 706 | scriptingRuntimeVersion: 1 707 | gcIncremental: 1 708 | assemblyVersionValidation: 1 709 | gcWBarrierValidation: 0 710 | apiCompatibilityLevelPerPlatform: {} 711 | m_RenderingPath: 1 712 | m_MobileRenderingPath: 1 713 | metroPackageName: Template_3D 714 | metroPackageVersion: 715 | metroCertificatePath: 716 | metroCertificatePassword: 717 | metroCertificateSubject: 718 | metroCertificateIssuer: 719 | metroCertificateNotAfter: 0000000000000000 720 | metroApplicationDescription: Template_3D 721 | wsaImages: {} 722 | metroTileShortName: 723 | metroTileShowName: 0 724 | metroMediumTileShowName: 0 725 | metroLargeTileShowName: 0 726 | metroWideTileShowName: 0 727 | metroSupportStreamingInstall: 0 728 | metroLastRequiredScene: 0 729 | metroDefaultTileSize: 1 730 | metroTileForegroundText: 2 731 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 732 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 733 | metroSplashScreenUseBackgroundColor: 0 734 | platformCapabilities: {} 735 | metroTargetDeviceFamilies: {} 736 | metroFTAName: 737 | metroFTAFileTypes: [] 738 | metroProtocolName: 739 | XboxOneProductId: 740 | XboxOneUpdateKey: 741 | XboxOneSandboxId: 742 | XboxOneContentId: 743 | XboxOneTitleId: 744 | XboxOneSCId: 745 | XboxOneGameOsOverridePath: 746 | XboxOnePackagingOverridePath: 747 | XboxOneAppManifestOverridePath: 748 | XboxOneVersion: 1.0.0.0 749 | XboxOnePackageEncryption: 0 750 | XboxOnePackageUpdateGranularity: 2 751 | XboxOneDescription: 752 | XboxOneLanguage: 753 | - enus 754 | XboxOneCapability: [] 755 | XboxOneGameRating: {} 756 | XboxOneIsContentPackage: 0 757 | XboxOneEnhancedXboxCompatibilityMode: 0 758 | XboxOneEnableGPUVariability: 1 759 | XboxOneSockets: {} 760 | XboxOneSplashScreen: {fileID: 0} 761 | XboxOneAllowedProductIds: [] 762 | XboxOnePersistentLocalStorageSize: 0 763 | XboxOneXTitleMemory: 8 764 | XboxOneOverrideIdentityName: 765 | XboxOneOverrideIdentityPublisher: 766 | vrEditorSettings: {} 767 | cloudServicesEnabled: 768 | UNet: 1 769 | luminIcon: 770 | m_Name: 771 | m_ModelFolderPath: 772 | m_PortalFolderPath: 773 | luminCert: 774 | m_CertPath: 775 | m_SignPackage: 1 776 | luminIsChannelApp: 0 777 | luminVersion: 778 | m_VersionCode: 1 779 | m_VersionName: 780 | apiCompatibilityLevel: 6 781 | activeInputHandler: 0 782 | cloudProjectId: 783 | framebufferDepthMemorylessMode: 0 784 | qualitySettingsNames: [] 785 | projectName: 786 | organizationId: 787 | cloudEnabled: 0 788 | legacyClampBlendShapeWeights: 0 789 | playerDataPath: 790 | forceSRGBBlit: 1 791 | virtualTexturingSupportEnabled: 0 792 | -------------------------------------------------------------------------------- /unityapp/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.2.7f1 2 | m_EditorVersionWithRevision: 2021.2.7f1 (6bd9e232123f) 3 | -------------------------------------------------------------------------------- /unityapp/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: 4 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 3DS: 5 229 | Nintendo Switch: 5 230 | PS4: 5 231 | PSP2: 2 232 | Server: 0 233 | Stadia: 5 234 | Standalone: 5 235 | WebGL: 3 236 | Windows Store Apps: 5 237 | XboxOne: 5 238 | iPhone: 2 239 | tvOS: 2 240 | -------------------------------------------------------------------------------- /unityapp/ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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 | -------------------------------------------------------------------------------- /unityapp/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 | } -------------------------------------------------------------------------------- /unityapp/ProjectSettings/boot.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidPeicho/unity-swiftui-example/7cbdf5bcbce08424d8a6bc5bac4c526ccfd566e8/unityapp/ProjectSettings/boot.config -------------------------------------------------------------------------------- /unitysandbox.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /unitysandbox.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /unitysandbox.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------