/// <summary> /// Sets up all required references to create and find anchors /// </summary> private void ConfigureReferences() { Log(nameof(ConfigureReferences)); CloudManager = GetComponent <SpatialAnchorManager>(); CloudManager.SessionUpdated += CloudManager_SessionUpdated; CloudManager.AnchorLocated += CloudManager_AnchorLocated; CloudManager.LocateAnchorsCompleted += CloudManager_LocateAnchorsCompleted; CloudManager.LogDebug += CloudManager_LogDebug; CloudManager.Error += CloudManager_Error; CloudManager.SpatialAnchorsAccountKey = Config.AccountKey; CloudManager.SpatialAnchorsAccountId = Config.AccountId; CloudManager.SpatialAnchorsAccountDomain = Config.AccountDomain; Log($"ASA Id {Config.AccountId}", true); Log($"ASA Key {Config.AccountKey}", true); Log($"ASA Domain {Config.AccountDomain}", true); anchorLocateCriteria = new AnchorLocateCriteria(); status = new AsaStatus(); //info: DemoScript also checks a reference for an input manager here. }
/// <summary> /// Sets up all required references to create and find anchors /// </summary> private void ConfigureReferences() { #if !UNITY_EDITOR Log(nameof(ConfigureReferences), true); CloudManager = GetComponent <SpatialAnchorManager>(); CloudManager.SessionUpdated += CloudManager_SessionUpdated; CloudManager.AnchorLocated += CloudManager_AnchorLocated; CloudManager.LocateAnchorsCompleted += CloudManager_LocateAnchorsCompleted; CloudManager.LogDebug += CloudManager_LogDebug; CloudManager.Error += CloudManager_Error; CloudManager.SpatialAnchorsAccountKey = Config.AccountKey; CloudManager.SpatialAnchorsAccountId = Config.AccountId; CloudManager.SpatialAnchorsAccountDomain = Config.AccountDomain; Log($"ASA Id {Config.AccountId}", true); Log($"ASA Key {Config.AccountKey}", true); Log($"ASA Domain {Config.AccountDomain}", true); anchorLocateCriteria = new AnchorLocateCriteria(); #else Log("ASA Config skipped due to wrong platform"); #endif status = new AsaStatus(); }
public AsaStatusEventArgs(AsaStatusEventType type, AsaStatus status) { Type = type; Status = status; }
private void SendUpdateOnMainThread(AsaStatusEventType type, AsaStatus status) { ExecuteOnMainThread(new Action(() => AsaStatusEventHook?.Invoke(this, new AsaStatusEventArgs(type, status)))); }
private void SendUpdateOnMainThread(AsaStatusEventType type, AsaStatus status) { Log($"{type}, {status.Percentage}", false); ExecuteOnMainThread(new Action(() => AsaStatusEventHook?.Invoke(this, new AsaStatusEventArgs(type, status)))); }