Skip to content

Commit ff40ec9

Browse files
committed
Packaging: Initial Unity Package
1 parent 5302096 commit ff40ec9

33 files changed

+807
-50
lines changed

unity/Assets/ARFlowPackage.meta

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

unity/Assets/Scripts/ARFlow/ARFlowClientManager.cs renamed to unity/Assets/ARFlowPackage/ARFlow/ARFlowClientManager.cs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,17 @@ public Task ConnectTask(
142142
if (activatedDataModalities == null)
143143
_activatedDataModalities = DEFAULT_MODALITIES;
144144

145-
try
146-
{
147-
// To avoid old method calls to log message
148-
oldTask?.ContinueWith(t => { });
149-
150-
var requestData = GetClientConfiguration();
151-
var task = Task.Run(() => _client.Connect(requestData));
152-
if (taskFinishedHook is not null)
153-
task.ContinueWith(taskFinishedHook);
154-
155-
oldTask = task;
145+
// To avoid old method calls to log message
146+
oldTask?.ContinueWith(t => { });
156147

157-
return task;
158-
}
159-
catch (Exception e)
160-
{
161-
PrintDebug(e.Message);
148+
var requestData = GetClientConfiguration();
149+
var task = Task.Run(() => _client.Connect(requestData));
150+
if (taskFinishedHook is not null)
151+
task.ContinueWith(taskFinishedHook);
162152

163-
}
153+
oldTask = task;
164154

165-
return null;
155+
return task;
166156
}
167157

168158

@@ -451,7 +441,6 @@ public ProcessFrameRequest CollectDataFrame()
451441
PrintDebug("audio");
452442
dataFrame.AudioData.Add(_audioStreaming.GetFrames());
453443
_audioStreaming.ClearFrameList();
454-
//Buffer.BlockCopy
455444
}
456445

457446
if (_activatedDataModalities["Meshing"])
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
namespace ARFlow
6+
{
7+
public static class OtherUtils
8+
{
9+
public static void PrintDebug(object message)
10+
{
11+
try
12+
{
13+
if (Debug.isDebugBuild)
14+
{
15+
Debug.Log(message);
16+
}
17+
}
18+
catch
19+
{
20+
//Debug.isDebugBuild throws error
21+
//not on main thread --> skip logging
22+
}
23+
}
24+
}
25+
26+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "com.cakelab.arflow",
3+
"version": "0.0.4",
4+
"displayName": "ARFlow Client",
5+
"description": "The ARFlow client is responsible for on-device AR data collection and high-performance AR data streaming. We implement the ARFlow client as a Unity application that can be easily ported to different platforms and devices.",
6+
"unity": "2022.3",
7+
"documentationUrl": "https://cake.wpi.edu/ARFlow/",
8+
"changelogUrl": "https://github.com/cake-lab/ARFlow",
9+
"keywords": [
10+
"AR",
11+
"ARFoundation",
12+
"Client"
13+
],
14+
"author": {
15+
"name": "Cake lab",
16+
"url": "https://cake.wpi.edu/"
17+
}
18+
}

unity/Assets/ARFlowPackage/ARFlow/package.json.meta

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

unity/Assets/ARFlowPackage/ARFlowDependencies.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "com.cakelab.arflow",
3+
"version": "0.0.4",
4+
"displayName": "ARFlow Client dependencies",
5+
"description": "Dependencies for the ARFlow Client Unity Package",
6+
"unity": "2022.3",
7+
"documentationUrl": "https://cake.wpi.edu/ARFlow/",
8+
"changelogUrl": "https://github.com/cake-lab/ARFlow",
9+
"keywords": [
10+
"AR",
11+
"ARFoundation",
12+
"Client"
13+
],
14+
"author": {
15+
"name": "Cake lab",
16+
"url": "https://cake.wpi.edu/"
17+
},
18+
"dependencies": {
19+
"com.atteneder.draco": "4.1.0"
20+
}
21+
}

unity/Assets/ARFlowPackage/ARFlowDependencies/package.json.meta

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

0 commit comments

Comments
 (0)