Skip to content

Commit 2932672

Browse files
authored
Release 0.4.2 (#8)
Develop @bb8dc940b4dd79cf333624ea57c707a13e4391f6
1 parent 7a1fd6c commit 2932672

File tree

8 files changed

+33
-18
lines changed

8 files changed

+33
-18
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ucrp-20240222
1+
ucrp-20240501
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using System;
22
using Unity.Cloud.Common;
33

4-
[assembly: ApiSourceVersion("Unity Cloud Reference Project", "0.4.1")]
4+
[assembly: ApiSourceVersion("Unity Cloud Reference Project", "0.4.2")]

ReferenceProject/Assets/_Application/NavigationModes/WalkMode/Runtime/Scripts/WalkModeMoveController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public float CharacterHeight
9797
CharacterController m_Controller;
9898
IObjectPicker m_Picker;
9999
Task m_GetGroundTask;
100-
PickerResult m_DownCastResult;
100+
IPickerResult m_DownCastResult;
101101
Vector3 m_MoveDirectionInput;
102102
Vector3 m_PlayerVelocity;
103103
IAppMessaging m_AppMessaging;

ReferenceProject/Assets/_Modules/AssetList/Runtime/Scripts/TransformationWorkflow/TransformationWorkflowController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public TransformationWorkflowController(IServiceHttpClient serviceHttpClient, IS
4646
public async Task StartTransformation(IDataset dataset, string file)
4747
{
4848
var descriptor = dataset.Descriptor;
49-
var url = ConstructUrl($"projects/{descriptor.ProjectId}/assets/{descriptor.AssetId}/versions/1/datasets/{descriptor.DatasetId}/transformations/start/3d-data-streaming");
49+
var url = ConstructUrl($"projects/{descriptor.ProjectId}/assets/{descriptor.AssetId}/versions/{descriptor.AssetVersion}/datasets/{descriptor.DatasetId}/transformations/start/3d-data-streaming");
5050

5151
try
5252
{

ReferenceProject/Assets/_Modules/ObjectSelection/Runtime/Scripts/DataStreamPicker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ void Setup(IDataStreamerProvider dataStreamerProvider)
2828
dataStreamerProvider.DataStreamer.StageDestroyed.Subscribe(() => m_Stage = null);
2929
}
3030

31-
public async Task<PickerResult> PickAsync(Ray ray, float maxDistance = k_MaxDistance)
31+
public async Task<IPickerResult> PickAsync(Ray ray, float maxDistance = k_MaxDistance)
3232
{
3333
var raycastResult = new PickerResult(await m_Stage.RaycastAsync(ray, maxDistance));
3434
return raycastResult;
3535
}
3636

37-
public async Task<PathPickerResult> PickFromPathAsync(Vector3[] points)
37+
public async Task<IPathPickerResult> PickFromPathAsync(Vector3[] points)
3838
{
3939
List<RayData> rays = new List<RayData>();
4040
for (int i = 0; i < points.Length - 2; i++)

ReferenceProject/Assets/_Modules/ObjectSelection/Runtime/Scripts/IObjectPicker.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
using System;
22
using System.Threading.Tasks;
33
using Unity.Cloud.Common;
4-
using Unity.Cloud.DataStreaming.Runtime;
54
using UnityEngine;
5+
using RaycastResult = Unity.Cloud.DataStreaming.Runtime.RaycastResult;
66

77
namespace Unity.ReferenceProject.ObjectSelection
88
{
9-
public struct PathPickerResult
9+
public interface IPickerResult
10+
{
11+
public Vector3 Point { get; }
12+
public Vector3 Normal { get; }
13+
public bool HasIntersected { get; }
14+
public InstanceId InstanceId { get; }
15+
public float Distance { get; }
16+
}
17+
18+
public interface IPathPickerResult
19+
{
20+
public int Index { get; }
21+
public IPickerResult PickerResult { get; }
22+
}
23+
24+
public struct PathPickerResult : IPathPickerResult
1025
{
1126
public int Index { get; set; }
12-
public PickerResult PickerResult { get; set; }
27+
public IPickerResult PickerResult { get; set; }
1328
}
1429

15-
public readonly struct PickerResult
30+
public readonly struct PickerResult : IPickerResult
1631
{
1732
public static readonly PickerResult Invalid = new(RaycastResult.Invalid);
1833

@@ -34,7 +49,7 @@ public PickerResult(RaycastResult raycastResult)
3449

3550
public interface IObjectPicker
3651
{
37-
Task<PickerResult> PickAsync(Ray ray, float maxDistance = 1000f);
38-
Task<PathPickerResult> PickFromPathAsync(Vector3[] points);
52+
Task<IPickerResult> PickAsync(Ray ray, float maxDistance = 1000f);
53+
Task<IPathPickerResult> PickFromPathAsync(Vector3[] points);
3954
}
4055
}

ReferenceProject/Assets/_Modules/ObjectSelection/Runtime/Scripts/ObjectSelectionController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async Task PickFromRayAsync(Ray ray)
196196
}
197197
}
198198

199-
void DispatchSelection(PickerResult pickResult)
199+
void DispatchSelection(IPickerResult pickResult)
200200
{
201201
var data = new ObjectSelectionInfo(pickResult.HasIntersected, pickResult.InstanceId,
202202
pickResult.Point, pickResult.Normal);

ReferenceProject/ProjectSettings/ProjectSettings.asset

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

0 commit comments

Comments
 (0)