示例#1
0
    public void StartAzureSession()
    {
        CloudManager.ResetSessionStatusIndicators();
        CloudManager.EnableProcessing = true;

        OnStartASASession?.Invoke();
    }
    public async void StartAzureSession()
    {
        trigger = false;

        Debug.Log("\nAnchorModuleScript.StartAzureSession()");

        SendTimeServer("ASA", Time.time.ToString() + "start Azure Session");

        // Notify AnchorFeedbackScript
        OnStartASASession?.Invoke();

        Debug.Log("Starting Azure session... please wait...");

        if (cloudManager.Session == null)
        {
            // Creates a new session if one does not exist
            await cloudManager.CreateSessionAsync();
        }

        // Starts the session if not already started
        await cloudManager.StartSessionAsync();

        Debug.Log("Azure session started successfully");

        SendTimeServer("ASA", Time.time.ToString() + "Azure session started successfully");

        trigger = true;
    }
示例#3
0
    public async Task StartAzureSessionForCoarseRelocalizationAsync()
    {
        Debug.Log("\nAnchorModuleScript.StartAzureSession()");

        // Notify AnchorFeedbackScript
        OnStartASASession?.Invoke();
        Debug.Log("Starting Azure session... please wait...");

        if (cloudManager.Session == null)
        {
            Debug.Log("Creating Session...");
            // Creates a new session if one does not exist
            await cloudManager.CreateSessionAsync();
        }

        Debug.Log("Settings Near Devices...");
        SetNearDevice();


        Debug.Log("Start Session...");
        // Starts the session if not already started
        await cloudManager.StartSessionAsync();

        Debug.Log("Device Permission Request...");
        // Request permission for using sensors.
        SensorPermissionHelper.RequestSensorPermissions();

        Debug.Log("Coarse Relocalization...");
        SetSessionForCoarseRelocalization();

        this.SessionStarted = true;

        Debug.Log("Azure session started successfully");
    }
示例#4
0
    public async Task StartAzureSession(string accountID, string accountKey, string accountDomain)
    {
        Debug.Log("\nAnchorModuleScript.StartAzureSession()");

        //Setup cloudmanager
        //cloudManager.AuthenticationMode = AuthenticationMode.ApiKey;
        //cloudManager.SpatialAnchorsAccountId = accountID;
        //cloudManager.SpatialAnchorsAccountKey = accountKey;
        //cloudManager.SpatialAnchorsAccountDomain = accountDomain;
        // Notify AnchorFeedbackScript
        OnStartASASession?.Invoke();

        Debug.Log("Starting Azure session... please wait...");

        if (cloudManager.Session == null)
        {
            // Creates a new session if one does not exist
            await cloudManager.CreateSessionAsync();
        }

        // Starts the session if not already started
        await cloudManager.StartSessionAsync();

        Debug.Log("Azure session started successfully");
    }
示例#5
0
    private async void StartAzureSession()
    {
        Debug.Log("\nAnchorModuleScript.StartAzureSession()");
        // Notify AnchorFeedbackScript
        OnStartASASession?.Invoke();

        Debug.Log("Starting Azure session... please wait...");

        if (cloudManager.Session == null)
        {
            // Creates a new session if one does not exist
            await cloudManager.CreateSessionAsync();
        }

        // Starts the session if not already started
        await cloudManager.StartSessionAsync();

        Debug.Log("Azure session started successfully");
    }