Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReferenceProject/Assets/Build/ucrp_base_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ucrp-20240222
ucrp-20240501
2 changes: 1 addition & 1 deletion ReferenceProject/Assets/_Application/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using Unity.Cloud.Common;

[assembly: ApiSourceVersion("Unity Cloud Reference Project", "0.4.1")]
[assembly: ApiSourceVersion("Unity Cloud Reference Project", "0.4.2")]
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public float CharacterHeight
CharacterController m_Controller;
IObjectPicker m_Picker;
Task m_GetGroundTask;
PickerResult m_DownCastResult;
IPickerResult m_DownCastResult;
Vector3 m_MoveDirectionInput;
Vector3 m_PlayerVelocity;
IAppMessaging m_AppMessaging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public TransformationWorkflowController(IServiceHttpClient serviceHttpClient, IS
public async Task StartTransformation(IDataset dataset, string file)
{
var descriptor = dataset.Descriptor;
var url = ConstructUrl($"projects/{descriptor.ProjectId}/assets/{descriptor.AssetId}/versions/1/datasets/{descriptor.DatasetId}/transformations/start/3d-data-streaming");
var url = ConstructUrl($"projects/{descriptor.ProjectId}/assets/{descriptor.AssetId}/versions/{descriptor.AssetVersion}/datasets/{descriptor.DatasetId}/transformations/start/3d-data-streaming");

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ void Setup(IDataStreamerProvider dataStreamerProvider)
dataStreamerProvider.DataStreamer.StageDestroyed.Subscribe(() => m_Stage = null);
}

public async Task<PickerResult> PickAsync(Ray ray, float maxDistance = k_MaxDistance)
public async Task<IPickerResult> PickAsync(Ray ray, float maxDistance = k_MaxDistance)
{
var raycastResult = new PickerResult(await m_Stage.RaycastAsync(ray, maxDistance));
return raycastResult;
}

public async Task<PathPickerResult> PickFromPathAsync(Vector3[] points)
public async Task<IPathPickerResult> PickFromPathAsync(Vector3[] points)
{
List<RayData> rays = new List<RayData>();
for (int i = 0; i < points.Length - 2; i++)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
using System;
using System.Threading.Tasks;
using Unity.Cloud.Common;
using Unity.Cloud.DataStreaming.Runtime;
using UnityEngine;
using RaycastResult = Unity.Cloud.DataStreaming.Runtime.RaycastResult;

namespace Unity.ReferenceProject.ObjectSelection
{
public struct PathPickerResult
public interface IPickerResult
{
public Vector3 Point { get; }
public Vector3 Normal { get; }
public bool HasIntersected { get; }
public InstanceId InstanceId { get; }
public float Distance { get; }
}

public interface IPathPickerResult
{
public int Index { get; }
public IPickerResult PickerResult { get; }
}

public struct PathPickerResult : IPathPickerResult
{
public int Index { get; set; }
public PickerResult PickerResult { get; set; }
public IPickerResult PickerResult { get; set; }
}

public readonly struct PickerResult
public readonly struct PickerResult : IPickerResult
{
public static readonly PickerResult Invalid = new(RaycastResult.Invalid);

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

public interface IObjectPicker
{
Task<PickerResult> PickAsync(Ray ray, float maxDistance = 1000f);
Task<PathPickerResult> PickFromPathAsync(Vector3[] points);
Task<IPickerResult> PickAsync(Ray ray, float maxDistance = 1000f);
Task<IPathPickerResult> PickFromPathAsync(Vector3[] points);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ async Task PickFromRayAsync(Ray ray)
}
}

void DispatchSelection(PickerResult pickResult)
void DispatchSelection(IPickerResult pickResult)
{
var data = new ObjectSelectionInfo(pickResult.HasIntersected, pickResult.InstanceId,
pickResult.Point, pickResult.Normal);
Expand Down
10 changes: 5 additions & 5 deletions ReferenceProject/ProjectSettings/ProjectSettings.asset

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.