Skip to content

Commit b891f8a

Browse files
authored
Merge pull request #68 from artoolkitx/phil-ios-build
Phil ios build
2 parents 6aa0a13 + 99cbc7c commit b891f8a

14 files changed

+198
-39
lines changed

Release Notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# artoolkitX for Unity Release Notes
22
------------------------------------
33

4+
## Version 1.1.9
5+
### 2023-05-15
6+
7+
Changes:
8+
* Updated the Unity project to Unity 2021.3.25f1.
9+
* Updated the native plugin to artoolkitX v1.1.8.
10+
411
## Version 1.1.8
512
### 2023-05-14
613

Source/Package/Assets/artoolkitX-Unity/Example Scenes/TwoMarkerScene.unity

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ MonoBehaviour:
268268
m_Script: {fileID: 11500000, guid: 9ac62947536a3704295fb870f025f1e1, type: 3}
269269
m_Name:
270270
m_EditorClassIdentifier:
271-
eventReceiver: {fileID: 0}
272271
Stereo: 0
273272
StereoEye: 1
274273
Optical: 0
@@ -638,6 +637,8 @@ MonoBehaviour:
638637
currentNFTMultiMode: 0
639638
currentTwoDMaxMarkersToTrack: 1
640639
currentLogLevel: 1
640+
currentSquareMatrixModeAutocreateNewTrackables: 0
641+
currentSquareMatrixModeAutocreateNewTrackablesDefaultWidth: 0.08
641642
scrollPosition: {x: 0, y: 0}
642643
--- !u!4 &1192976671
643644
Transform:
@@ -1098,9 +1099,18 @@ MonoBehaviour:
10981099
m_Script: {fileID: 11500000, guid: e02d1ce5da0c446acaea956b6ae07690, type: 3}
10991100
m_Name:
11001101
m_EditorClassIdentifier:
1102+
_trackableTag: kanji
11011103
secondsToRemainVisible: 0
1104+
OnTrackedObjectFound:
1105+
m_PersistentCalls:
1106+
m_Calls: []
1107+
OnTrackedObjectTracked:
1108+
m_PersistentCalls:
1109+
m_Calls: []
1110+
OnTrackedObjectLost:
1111+
m_PersistentCalls:
1112+
m_Calls: []
11021113
eventReceiver: {fileID: 0}
1103-
_trackableTag: kanji
11041114
--- !u!1 &1562006351
11051115
GameObject:
11061116
m_ObjectHideFlags: 0
@@ -1240,9 +1250,18 @@ MonoBehaviour:
12401250
m_Script: {fileID: 11500000, guid: e02d1ce5da0c446acaea956b6ae07690, type: 3}
12411251
m_Name:
12421252
m_EditorClassIdentifier:
1253+
_trackableTag: hiro
12431254
secondsToRemainVisible: 0
1255+
OnTrackedObjectFound:
1256+
m_PersistentCalls:
1257+
m_Calls: []
1258+
OnTrackedObjectTracked:
1259+
m_PersistentCalls:
1260+
m_Calls: []
1261+
OnTrackedObjectLost:
1262+
m_PersistentCalls:
1263+
m_Calls: []
12441264
eventReceiver: {fileID: 0}
1245-
_trackableTag: hiro
12461265
--- !u!1 &2045854512
12471266
GameObject:
12481267
m_ObjectHideFlags: 0

Source/Package/Assets/artoolkitX-Unity/Plugins/x86.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitMenuEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ public class ARToolKitMenuEditor : MonoBehaviour {
5353
private const string SOURCE_URL = "https://github.com/artoolkitx/artoolkitx";
5454
private const string PLUGIN_SOURCE_URL = "https://github.com/artoolkitx/arunityx";
5555
//private const string TOOLS_URL = "http://artoolkit.org/download-artoolkit-sdk#unity";
56-
private const string VERSION = MENU_PATH_BASE + "/artoolkitX for Unity Version 1.1.8";
56+
private const string VERSION = MENU_PATH_BASE + "/artoolkitX for Unity Version 1.1.9";
5757
private const string WINDOWS_UNITY_MESSAGE = "Thank you for choosing artoolkitX for Unity! " +
5858
"<b>artoolkitX requires the Microsoft C++ Redistributables to be installed on your system.</b>\n" +
5959
"Please select \"{0}\" from the menu above, and install the required packages.";
60-
private const string GET_TOOLS_MESSAGE = "artoolkitX for Unity Version 1.1.8! <b>To make your own markers, you'll need to download our tools.</b>\n" +
60+
private const string GET_TOOLS_MESSAGE = "artoolkitX for Unity Version 1.1.9! <b>To make your own markers, you'll need to download our tools.</b>\n" +
6161
"Please select {0} from menu above to download them.";
6262

6363
static ARToolKitMenuEditor() {

Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPostProcessor.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
* are not obligated to do so. If you do not wish to do so, delete this exception
2929
* statement from your version.
3030
*
31+
* Copyright 2023 Philip Lamb
3132
* Copyright 2015 Daqri, LLC.
3233
*
33-
* Author(s): Wally Young
34+
* Author(s): Wally Young, Philip Lamb
3435
*
3536
*/
3637

@@ -64,10 +65,14 @@ public class ARToolKitPostProcessor : IPostprocessBuildWithReport
6465
};
6566

6667
// Setting name, value to add.
67-
private static Tuple<string, string>[] IosBuildValues = {
68+
private static Tuple<string, string>[] IosBuildValuesToAdd = {
6869
new Tuple<string, string>("OTHER_LDFLAGS", "-lsqlite3"),
6970
};
7071

72+
private static Tuple<string, string>[] IosBuildValuesToSetInProject = {
73+
new Tuple<string, string>("ENABLE_BITCODE", "NO"),
74+
};
75+
7176
private static StreamWriter streamWriter = null;
7277
#endif
7378

@@ -99,7 +104,6 @@ public void OnPostprocessBuild(BuildReport report) {
99104
foreach (string redistFile in REDIST_FILES) {
100105
File.Move(Path.Combine(fromPath, redistFile), Path.Combine(pathDirectory, redistFile));
101106
}
102-
}
103107
#elif UNITY_IPHONE
104108
const string LOGFILE_NAME = "postprocess.log";
105109

@@ -125,21 +129,26 @@ public void OnPostprocessBuild(BuildReport report) {
125129
PBXProject project = new PBXProject();
126130
project.ReadFromFile(pbxprojPath);
127131

128-
string g = project.GetUnityFrameworkTargetGuid();
132+
string unityFrameworkGUID = project.GetUnityFrameworkTargetGuid();
129133

130134
streamWriter.WriteLine("OnIosPostProcess - Modifying file at " + pbxprojPath);
131135

132136
foreach (var f in IosFrameworks)
133137
{
134-
project.AddFrameworkToProject(g, f.Item1, f.Item2);
138+
project.AddFrameworkToProject(unityFrameworkGUID, f.Item1, f.Item2);
135139
}
136140

137-
foreach (var bv in IosBuildValues)
141+
foreach (var bv in IosBuildValuesToAdd)
138142
{
139-
project.AddBuildProperty(g, bv.Item1, bv.Item2);
143+
project.AddBuildProperty(unityFrameworkGUID, bv.Item1, bv.Item2);
140144
//project.UpdateBuildProperty(g, bv.Item1, new string[] { bv.Item2 }, new string[] { });
141145
}
142146

147+
foreach (var bv in IosBuildValuesToSetInProject)
148+
{
149+
project.SetBuildProperty(project.ProjectGuid(), bv.Item1, bv.Item2);
150+
}
151+
143152
project.WriteToFile(pbxprojPath);
144153

145154
streamWriter.WriteLine("OnIosPostProcess - Ending iOS post-processing successfully.");
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* ARToolKitPreprocessor.cs
3+
* artoolkitX for Unity
4+
*
5+
* This file is part of artoolkitX for Unity.
6+
*
7+
* artoolkitX for Unity is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* artoolkitX for Unity is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with artoolkitX for Unity. If not, see <http://www.gnu.org/licenses/>.
19+
*
20+
* As a special exception, the copyright holders of this library give you
21+
* permission to link this library with independent modules to produce an
22+
* executable, regardless of the license terms of these independent modules, and to
23+
* copy and distribute the resulting executable under terms of your choice,
24+
* provided that you also meet, for each linked independent module, the terms and
25+
* conditions of the license of that module. An independent module is a module
26+
* which is neither derived from nor based on this library. If you modify this
27+
* library, you may extend this exception to your version of the library, but you
28+
* are not obligated to do so. If you do not wish to do so, delete this exception
29+
* statement from your version.
30+
*
31+
* Copyright 2023 Philip Lamb
32+
*
33+
* Author(s): Philip Lamb
34+
*
35+
*/
36+
37+
using UnityEditor;
38+
using UnityEditor.Build;
39+
using UnityEditor.Build.Reporting;
40+
using UnityEngine;
41+
42+
public class ARToolKitPreprocessor : IPreprocessBuildWithReport
43+
{
44+
public int callbackOrder { get { return 0; } }
45+
46+
public void OnPreprocessBuild(BuildReport report)
47+
{
48+
const string cameraUsageDescRequired = "Camera usage description required, but not set in player settings.";
49+
const string cameraUsageDescDefault = "Required for AR tracking. Video is used in realtime, and is not stored or transmitted outside the app.";
50+
const bool cameraUsageDescFailIfMissing = false;
51+
52+
BuildTarget platform = report.summary.platform;
53+
54+
if (platform == BuildTarget.iOS)
55+
{
56+
string cameraUsageDescription = PlayerSettings.iOS.cameraUsageDescription;
57+
if (string.IsNullOrWhiteSpace(cameraUsageDescription)) {
58+
if (cameraUsageDescFailIfMissing)
59+
{
60+
throw new BuildFailedException(cameraUsageDescRequired);
61+
}
62+
else
63+
{
64+
Debug.LogWarning(cameraUsageDescRequired + "Set to default.");
65+
PlayerSettings.iOS.cameraUsageDescription = cameraUsageDescDefault;
66+
}
67+
68+
}
69+
}
70+
else if (platform == BuildTarget.StandaloneOSX)
71+
{
72+
string cameraUsageDescription = PlayerSettings.macOS.cameraUsageDescription;
73+
if (string.IsNullOrWhiteSpace(cameraUsageDescription))
74+
{
75+
if (cameraUsageDescFailIfMissing)
76+
{
77+
throw new BuildFailedException(cameraUsageDescRequired);
78+
}
79+
else
80+
{
81+
Debug.LogWarning(cameraUsageDescRequired + "Set to default.");
82+
PlayerSettings.macOS.cameraUsageDescription = cameraUsageDescDefault;
83+
}
84+
}
85+
}
86+
}
87+
}

Source/Package/Assets/artoolkitX-Unity/Scripts/Editor/ARToolKitPreprocessor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Package/Packages/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"dependencies": {
33
"com.unity.2d.sprite": "1.0.0",
44
"com.unity.analytics": "3.6.12",
5-
"com.unity.ide.visualstudio": "2.0.17",
5+
"com.unity.ide.visualstudio": "2.0.18",
66
"com.unity.ide.vscode": "1.2.5",
77
"com.unity.textmeshpro": "3.0.6",
8-
"com.unity.timeline": "1.6.4",
8+
"com.unity.timeline": "1.6.5",
99
"com.unity.ugui": "1.0.0",
1010
"com.unity.xr.legacyinputhelpers": "2.1.10",
1111
"com.unity.modules.ai": "1.0.0",

Source/Package/Packages/packages-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"url": "https://packages.unity.com"
2424
},
2525
"com.unity.ide.visualstudio": {
26-
"version": "2.0.17",
26+
"version": "2.0.18",
2727
"depth": 0,
2828
"source": "registry",
2929
"dependencies": {
@@ -59,7 +59,7 @@
5959
"url": "https://packages.unity.com"
6060
},
6161
"com.unity.timeline": {
62-
"version": "1.6.4",
62+
"version": "1.6.5",
6363
"depth": 0,
6464
"source": "registry",
6565
"dependencies": {

Source/Package/ProjectSettings/EditorSettings.asset

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,42 @@
33
--- !u!159 &1
44
EditorSettings:
55
m_ObjectHideFlags: 0
6-
serializedVersion: 7
7-
m_ExternalVersionControlSupport: Hidden Meta Files
6+
serializedVersion: 11
87
m_SerializationMode: 2
98
m_LineEndingsForNewScripts: 1
109
m_DefaultBehaviorMode: 0
10+
m_PrefabRegularEnvironment: {fileID: 0}
11+
m_PrefabUIEnvironment: {fileID: 0}
1112
m_SpritePackerMode: 0
1213
m_SpritePackerPaddingPower: 1
14+
m_Bc7TextureCompressor: 0
1315
m_EtcTextureCompressorBehavior: 1
1416
m_EtcTextureFastCompressor: 1
1517
m_EtcTextureNormalCompressor: 2
1618
m_EtcTextureBestCompressor: 4
17-
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp
19+
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
1820
m_ProjectGenerationRootNamespace:
19-
m_UserGeneratedProjectSuffix:
20-
m_CollabEditorSettings:
21-
inProgressEnabled: 1
21+
m_EnableTextureStreamingInEditMode: 1
22+
m_EnableTextureStreamingInPlayMode: 1
23+
m_AsyncShaderCompilation: 1
24+
m_CachingShaderPreprocessor: 1
25+
m_PrefabModeAllowAutoSave: 1
26+
m_EnterPlayModeOptionsEnabled: 0
27+
m_EnterPlayModeOptions: 3
28+
m_GameObjectNamingDigits: 1
29+
m_GameObjectNamingScheme: 0
30+
m_AssetNamingUsesSpace: 1
31+
m_UseLegacyProbeSampleCount: 1
32+
m_SerializeInlineMappingsOnOneLine: 0
33+
m_DisableCookiesInLightmapper: 1
34+
m_AssetPipelineMode: 1
35+
m_RefreshImportMode: 0
36+
m_CacheServerMode: 0
37+
m_CacheServerEndpoint:
38+
m_CacheServerNamespacePrefix: default
39+
m_CacheServerEnableDownload: 1
40+
m_CacheServerEnableUpload: 1
41+
m_CacheServerEnableAuth: 0
42+
m_CacheServerEnableTls: 0
43+
m_CacheServerValidationMode: 2
44+
m_CacheServerDownloadBatchSize: 128

0 commit comments

Comments
 (0)