diff --git a/Release Notes.md b/Release Notes.md index a4b8a77..c9a28cb 100644 --- a/Release Notes.md +++ b/Release Notes.md @@ -1,6 +1,13 @@ # artoolkitX for Unity Release Notes ------------------------------------ +## Version 1.1.9 +### 2023-05-15 + +Changes: + * Updated the Unity project to Unity 2021.3.25f1. + * Updated the native plugin to artoolkitX v1.1.8. + ## Version 1.1.8 ### 2023-05-14 diff --git a/Source/Extras/artoolkitx b/Source/Extras/artoolkitx index 04397e4..188c149 160000 --- a/Source/Extras/artoolkitx +++ b/Source/Extras/artoolkitx @@ -1 +1 @@ -Subproject commit 04397e4612ae10969e36d68111e39632d0bf5185 +Subproject commit 188c1491eac46e71b3768c89aeb6cadc07c51a59 diff --git a/Source/Package/Assets/artoolkitX-Unity/Example Scenes/TwoMarkerScene.unity b/Source/Package/Assets/artoolkitX-Unity/Example Scenes/TwoMarkerScene.unity index 6aeba18..15783c7 100644 --- a/Source/Package/Assets/artoolkitX-Unity/Example Scenes/TwoMarkerScene.unity +++ b/Source/Package/Assets/artoolkitX-Unity/Example Scenes/TwoMarkerScene.unity @@ -268,7 +268,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9ac62947536a3704295fb870f025f1e1, type: 3} m_Name: m_EditorClassIdentifier: - eventReceiver: {fileID: 0} Stereo: 0 StereoEye: 1 Optical: 0 @@ -638,6 +637,8 @@ MonoBehaviour: currentNFTMultiMode: 0 currentTwoDMaxMarkersToTrack: 1 currentLogLevel: 1 + currentSquareMatrixModeAutocreateNewTrackables: 0 + currentSquareMatrixModeAutocreateNewTrackablesDefaultWidth: 0.08 scrollPosition: {x: 0, y: 0} --- !u!4 &1192976671 Transform: @@ -1098,9 +1099,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e02d1ce5da0c446acaea956b6ae07690, type: 3} m_Name: m_EditorClassIdentifier: + _trackableTag: kanji secondsToRemainVisible: 0 + OnTrackedObjectFound: + m_PersistentCalls: + m_Calls: [] + OnTrackedObjectTracked: + m_PersistentCalls: + m_Calls: [] + OnTrackedObjectLost: + m_PersistentCalls: + m_Calls: [] eventReceiver: {fileID: 0} - _trackableTag: kanji --- !u!1 &1562006351 GameObject: m_ObjectHideFlags: 0 @@ -1240,9 +1250,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e02d1ce5da0c446acaea956b6ae07690, type: 3} m_Name: m_EditorClassIdentifier: + _trackableTag: hiro secondsToRemainVisible: 0 + OnTrackedObjectFound: + m_PersistentCalls: + m_Calls: [] + OnTrackedObjectTracked: + m_PersistentCalls: + m_Calls: [] + OnTrackedObjectLost: + m_PersistentCalls: + m_Calls: [] eventReceiver: {fileID: 0} - _trackableTag: hiro --- !u!1 &2045854512 GameObject: m_ObjectHideFlags: 0 diff --git a/Source/Package/Assets/artoolkitX-Unity/Plugins/x86.meta b/Source/Package/Assets/artoolkitX-Unity/Plugins/x86.meta deleted file mode 100644 index 9afaf75..0000000 --- a/Source/Package/Assets/artoolkitX-Unity/Plugins/x86.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 600bccd6360ff488794c38029fd8f9d9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitMenuEditor.cs b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitMenuEditor.cs index d736882..e14f5e0 100644 --- a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitMenuEditor.cs +++ b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitMenuEditor.cs @@ -53,11 +53,11 @@ public class ARToolKitMenuEditor : MonoBehaviour { private const string SOURCE_URL = "https://github.com/artoolkitx/artoolkitx"; private const string PLUGIN_SOURCE_URL = "https://github.com/artoolkitx/arunityx"; //private const string TOOLS_URL = "http://artoolkit.org/download-artoolkit-sdk#unity"; - private const string VERSION = MENU_PATH_BASE + "/artoolkitX for Unity Version 1.1.8"; + private const string VERSION = MENU_PATH_BASE + "/artoolkitX for Unity Version 1.1.9"; private const string WINDOWS_UNITY_MESSAGE = "Thank you for choosing artoolkitX for Unity! " + "artoolkitX requires the Microsoft C++ Redistributables to be installed on your system.\n" + "Please select \"{0}\" from the menu above, and install the required packages."; - private const string GET_TOOLS_MESSAGE = "artoolkitX for Unity Version 1.1.8! To make your own markers, you'll need to download our tools.\n" + + private const string GET_TOOLS_MESSAGE = "artoolkitX for Unity Version 1.1.9! To make your own markers, you'll need to download our tools.\n" + "Please select {0} from menu above to download them."; static ARToolKitMenuEditor() { diff --git a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPostProcessor.cs b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPostProcessor.cs index 84be83d..1878337 100644 --- a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPostProcessor.cs +++ b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPostProcessor.cs @@ -28,9 +28,10 @@ * are not obligated to do so. If you do not wish to do so, delete this exception * statement from your version. * + * Copyright 2023 Philip Lamb * Copyright 2015 Daqri, LLC. * - * Author(s): Wally Young + * Author(s): Wally Young, Philip Lamb * */ @@ -64,10 +65,14 @@ public class ARToolKitPostProcessor : IPostprocessBuildWithReport }; // Setting name, value to add. - private static Tuple[] IosBuildValues = { + private static Tuple[] IosBuildValuesToAdd = { new Tuple("OTHER_LDFLAGS", "-lsqlite3"), }; + private static Tuple[] IosBuildValuesToSetInProject = { + new Tuple("ENABLE_BITCODE", "NO"), + }; + private static StreamWriter streamWriter = null; #endif @@ -99,7 +104,6 @@ public void OnPostprocessBuild(BuildReport report) { foreach (string redistFile in REDIST_FILES) { File.Move(Path.Combine(fromPath, redistFile), Path.Combine(pathDirectory, redistFile)); } - } #elif UNITY_IPHONE const string LOGFILE_NAME = "postprocess.log"; @@ -125,21 +129,26 @@ public void OnPostprocessBuild(BuildReport report) { PBXProject project = new PBXProject(); project.ReadFromFile(pbxprojPath); - string g = project.GetUnityFrameworkTargetGuid(); + string unityFrameworkGUID = project.GetUnityFrameworkTargetGuid(); streamWriter.WriteLine("OnIosPostProcess - Modifying file at " + pbxprojPath); foreach (var f in IosFrameworks) { - project.AddFrameworkToProject(g, f.Item1, f.Item2); + project.AddFrameworkToProject(unityFrameworkGUID, f.Item1, f.Item2); } - foreach (var bv in IosBuildValues) + foreach (var bv in IosBuildValuesToAdd) { - project.AddBuildProperty(g, bv.Item1, bv.Item2); + project.AddBuildProperty(unityFrameworkGUID, bv.Item1, bv.Item2); //project.UpdateBuildProperty(g, bv.Item1, new string[] { bv.Item2 }, new string[] { }); } + foreach (var bv in IosBuildValuesToSetInProject) + { + project.SetBuildProperty(project.ProjectGuid(), bv.Item1, bv.Item2); + } + project.WriteToFile(pbxprojPath); streamWriter.WriteLine("OnIosPostProcess - Ending iOS post-processing successfully."); diff --git a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs new file mode 100644 index 0000000..d0fbb9e --- /dev/null +++ b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs @@ -0,0 +1,87 @@ +/* + * ARToolKitPreprocessor.cs + * artoolkitX for Unity + * + * This file is part of artoolkitX for Unity. + * + * artoolkitX for Unity is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * artoolkitX for Unity is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with artoolkitX for Unity. If not, see . + * + * As a special exception, the copyright holders of this library give you + * permission to link this library with independent modules to produce an + * executable, regardless of the license terms of these independent modules, and to + * copy and distribute the resulting executable under terms of your choice, + * provided that you also meet, for each linked independent module, the terms and + * conditions of the license of that module. An independent module is a module + * which is neither derived from nor based on this library. If you modify this + * library, you may extend this exception to your version of the library, but you + * are not obligated to do so. If you do not wish to do so, delete this exception + * statement from your version. + * + * Copyright 2023 Philip Lamb + * + * Author(s): Philip Lamb + * + */ + +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Build.Reporting; +using UnityEngine; + +public class ARToolKitPreprocessor : IPreprocessBuildWithReport +{ + public int callbackOrder { get { return 0; } } + + public void OnPreprocessBuild(BuildReport report) + { + const string cameraUsageDescRequired = "Camera usage description required, but not set in player settings."; + const string cameraUsageDescDefault = "Required for AR tracking. Video is used in realtime, and is not stored or transmitted outside the app."; + const bool cameraUsageDescFailIfMissing = false; + + BuildTarget platform = report.summary.platform; + + if (platform == BuildTarget.iOS) + { + string cameraUsageDescription = PlayerSettings.iOS.cameraUsageDescription; + if (string.IsNullOrWhiteSpace(cameraUsageDescription)) { + if (cameraUsageDescFailIfMissing) + { + throw new BuildFailedException(cameraUsageDescRequired); + } + else + { + Debug.LogWarning(cameraUsageDescRequired + "Set to default."); + PlayerSettings.iOS.cameraUsageDescription = cameraUsageDescDefault; + } + + } + } + else if (platform == BuildTarget.StandaloneOSX) + { + string cameraUsageDescription = PlayerSettings.macOS.cameraUsageDescription; + if (string.IsNullOrWhiteSpace(cameraUsageDescription)) + { + if (cameraUsageDescFailIfMissing) + { + throw new BuildFailedException(cameraUsageDescRequired); + } + else + { + Debug.LogWarning(cameraUsageDescRequired + "Set to default."); + PlayerSettings.macOS.cameraUsageDescription = cameraUsageDescDefault; + } + } + } + } +} diff --git a/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs.meta b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs.meta new file mode 100644 index 0000000..eafcd41 --- /dev/null +++ b/Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab50b4c7ff07348109e82558e18eb570 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Source/Package/Packages/manifest.json b/Source/Package/Packages/manifest.json index daabf74..00524d4 100644 --- a/Source/Package/Packages/manifest.json +++ b/Source/Package/Packages/manifest.json @@ -2,10 +2,10 @@ "dependencies": { "com.unity.2d.sprite": "1.0.0", "com.unity.analytics": "3.6.12", - "com.unity.ide.visualstudio": "2.0.17", + "com.unity.ide.visualstudio": "2.0.18", "com.unity.ide.vscode": "1.2.5", "com.unity.textmeshpro": "3.0.6", - "com.unity.timeline": "1.6.4", + "com.unity.timeline": "1.6.5", "com.unity.ugui": "1.0.0", "com.unity.xr.legacyinputhelpers": "2.1.10", "com.unity.modules.ai": "1.0.0", diff --git a/Source/Package/Packages/packages-lock.json b/Source/Package/Packages/packages-lock.json index 9c6beba..9bf3bc2 100644 --- a/Source/Package/Packages/packages-lock.json +++ b/Source/Package/Packages/packages-lock.json @@ -23,7 +23,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.17", + "version": "2.0.18", "depth": 0, "source": "registry", "dependencies": { @@ -59,7 +59,7 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.6.4", + "version": "1.6.5", "depth": 0, "source": "registry", "dependencies": { diff --git a/Source/Package/ProjectSettings/EditorSettings.asset b/Source/Package/ProjectSettings/EditorSettings.asset index d0c3d4a..ba10c44 100644 --- a/Source/Package/ProjectSettings/EditorSettings.asset +++ b/Source/Package/ProjectSettings/EditorSettings.asset @@ -3,19 +3,42 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 - m_ExternalVersionControlSupport: Hidden Meta Files + serializedVersion: 11 m_SerializationMode: 2 m_LineEndingsForNewScripts: 1 m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 + m_Bc7TextureCompressor: 0 m_EtcTextureCompressorBehavior: 1 m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref m_ProjectGenerationRootNamespace: - m_UserGeneratedProjectSuffix: - m_CollabEditorSettings: - inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_CachingShaderPreprocessor: 1 + m_PrefabModeAllowAutoSave: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_GameObjectNamingDigits: 1 + m_GameObjectNamingScheme: 0 + m_AssetNamingUsesSpace: 1 + m_UseLegacyProbeSampleCount: 1 + m_SerializeInlineMappingsOnOneLine: 0 + m_DisableCookiesInLightmapper: 1 + m_AssetPipelineMode: 1 + m_RefreshImportMode: 0 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 + m_CacheServerValidationMode: 2 + m_CacheServerDownloadBatchSize: 128 diff --git a/Source/Package/ProjectSettings/ProjectSettings.asset b/Source/Package/ProjectSettings/ProjectSettings.asset index a5d2fe9..351eec3 100644 --- a/Source/Package/ProjectSettings/ProjectSettings.asset +++ b/Source/Package/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 23 + serializedVersion: 24 productGUID: d36fc35b76c1446deb0a38da78624aca AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.1.8 + bundleVersion: 1.1.9 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -151,6 +151,7 @@ PlayerSettings: m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: @@ -177,10 +178,10 @@ PlayerSettings: StripUnusedMeshComponents: 0 VertexChannelCompressionMask: 214 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 11.0 + iOSTargetOSVersionString: 12.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 11.0 + tvOSTargetOSVersionString: 12.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -461,6 +462,7 @@ PlayerSettings: m_Kind: 0 m_SubKind: m_BuildTargetBatching: [] + m_BuildTargetShaderSettings: [] m_BuildTargetGraphicsJobs: - m_BuildTarget: WindowsStandaloneSupport m_GraphicsJobs: 0 @@ -511,6 +513,8 @@ PlayerSettings: m_APIs: 0b00000008000000 m_Automatic: 0 m_BuildTargetVRSettings: [] + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 @@ -529,7 +533,8 @@ PlayerSettings: enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 - cameraUsageDescription: For AR tracking + cameraUsageDescription: Required for AR tracking. Video is used in realtime, and + is not stored or transmitted outside the app. locationUsageDescription: microphoneUsageDescription: bluetoothUsageDescription: @@ -617,7 +622,6 @@ PlayerSettings: switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 switchApplicationErrorCodeCategory: @@ -659,6 +663,7 @@ PlayerSettings: switchNativeFsCacheSize: 32 switchIsHoldTypeHorizontal: 0 switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 @@ -671,6 +676,7 @@ PlayerSettings: switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 1 switchUseMicroSleepForYield: 1 switchEnableRamDiskSupport: 0 switchMicroSleepForYieldTime: 25 @@ -745,6 +751,7 @@ PlayerSettings: ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 ps4GPU800MHz: 1 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] @@ -769,6 +776,7 @@ PlayerSettings: webGLLinkerTarget: 0 webGLThreadsSupport: 0 webGLDecompressionFallback: 0 + webGLPowerPreference: 2 scriptingDefineSymbols: {} additionalCompilerArguments: {} platformArchitecture: {} @@ -794,6 +802,7 @@ PlayerSettings: allowUnsafeCode: 0 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 + selectedPlatform: 3 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1 @@ -873,6 +882,7 @@ PlayerSettings: m_VersionName: apiCompatibilityLevel: 6 activeInputHandler: 0 + windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 qualitySettingsNames: [] diff --git a/Source/packaging/package.sh b/Source/packaging/package.sh index f49cff2..9157d30 100755 --- a/Source/packaging/package.sh +++ b/Source/packaging/package.sh @@ -26,6 +26,7 @@ # # Define UNITY_EDITOR to path to Unity Editor executable, or default will be used. +# Define UNITY_WITH_GPU (e.g. 'UNITY_WITH_GPU=') to disabled Unity's "-nographics" switch. # -e = exit on errors set -e -x @@ -108,7 +109,7 @@ sed -Ei "" "s/artoolkitX for Unity Version (([0-9]+\.[0-9]+)(\.[0-9]+)?(r[0-9]+) "${UNITY_EDITOR}" \ -quit \ -batchmode \ - -nographics \ + ${UNITY_WITH_GPU--nographics} \ -stackTraceLogType Full \ -projectPath "${UNITY_PROJECT_PATH}" \ -arunityxpackagename arunityX-${VERSION}.unitypackage \ diff --git a/artoolkitx-version.txt b/artoolkitx-version.txt index a5ba932..18efdb9 100644 --- a/artoolkitx-version.txt +++ b/artoolkitx-version.txt @@ -1 +1 @@ -1.1.7 \ No newline at end of file +1.1.8