Exemple #1
0
        void Start()
        {
            dropdown = destinationDropdown.GetComponent <TMP_Dropdown>();
            dropdown.options.Clear();
            dropdown.options.Add(new TMP_Dropdown.OptionData("Select Destination"));

            map_id = PlayerPrefs.GetString("MAP_ID");
            Debug.Log("MapID >> " + map_id);

            filePath = $"{Application.persistentDataPath}/Files/test.glb";

            navController = this.GetComponent <NavController>();

            if (map_id.Length > 0)
            {
                m_Sdk = ArwaySDK.Instance;

                if (m_Sdk.developerToken != null && m_Sdk.developerToken.Length > 0)
                {
                    StartCoroutine(GetMapData(map_id));
                }
                else
                {
                    Debug.Log("***********\tInvalid Developer Token!\t***********");
                    NotificationManager.Instance.GenerateError("Invalid Developer Token!!");
                }
            }

            if (m_ARSpace == null)
            {
                m_ARSpace = new GameObject("ARSpace");

                if (m_ARSpace == null)
                {
                    Debug.Log("No AR Space found");
                }
            }

            // Create WaypointsAndDestinations Group with an ARAnchor
            m_WaypointsAndDestinations = new GameObject("Waypoints & Destinations");
            m_WaypointsAndDestinations.transform.parent = m_ARSpace.transform;

            // Create 3D Models Group with an ARAnchor
            m_3DModels = new GameObject("3D Models");
            m_3DModels.transform.parent = m_ARSpace.transform;

            // Create Images Group with an ARAnchor
            m_Images = new GameObject("Images");
            m_Images.transform.parent = m_ARSpace.transform;

            // Create Text Group with an ARAnchor
            m_Texts = new GameObject("Texts");
            m_Texts.transform.parent = m_ARSpace.transform;

            // Get reference to AzureAnchorLocalizer script
            if (m_Sdk.GetComponent <AzureAnchorLocalizer>() != null)
            {
                azureAnchorLocalizer = m_Sdk.GetComponent <AzureAnchorLocalizer>();
            }
        }
        /// <summary>
        /// Start this instance.
        /// </summary>
        public override void Start()
        {
            m_Sdk = ArwaySDK.Instance;

            if (string.IsNullOrEmpty(m_Sdk.developerToken))
            {
                NotificationManager.Instance.GenerateError("Invalid Developer Token!");
            }

            ARSpace.SetActive(showContentBeforeLocalization);
            destinationDropdown.SetActive(showContentBeforeLocalization);

            // Set max Localization Time to 30 secs
            if (localizationTimeout > 30f)
            {
                localizationTimeout = 30f;
            }

            base.Start();

            if (!SanityCheckAccessConfiguration())
            {
                return;
            }

            feedbackBox.text = stateParams[currentAppState].StepMessage;
        }
 private void Start()
 {
     if (m_Sdk == null)
     {
         m_Sdk = ArwaySDK.Instance;
     }
 }
        // Start is called before the first frame update
        void Start()
        {
            GetMapCoordinates();

            pcdPath = Path.Combine(Application.persistentDataPath + "/map/", pcdName);

            m_Sdk = ArwaySDK.Instance;

            //deleteMapURL = m_Sdk.ContentServer + EndPoint.DELETE_CLOUD_MAP;
            uploadURL = m_Sdk.ContentServer + EndPoint.MAP_UPLOAD;
            devToken  = m_Sdk.developerToken;
        }
Exemple #5
0
        void Login(string email, string password)
        {
            WWWForm form = new WWWForm();

            form.AddField("user", email);
            form.AddField("pass", password);

            sdk = ArwaySDK.Instance;

            request = UnityWebRequest.Post(sdk.ContentServer + EndPoint.AUTH, form);
            request.useHttpContinue = false;
            request.SendWebRequest();
        }
Exemple #6
0
 void Start()
 {
     m_Sdk = ArwaySDK.Instance;
     if (m_Sdk.developerToken != null && m_Sdk.developerToken.Length > 0)
     {
         Invoke("CallGetMapList", 1.0f);
     }
     else
     {
         Debug.Log("***********\tDeveloper Token not valid!\t***********");
         NotificationManager.Instance.GenerateError("Invalid Developer Token!!");
     }
 }
        /// <summary>
        /// Start this instance.
        /// </summary>
        void Start()
        {
            m_Sdk = ArwaySDK.Instance;
            sessionCookieString = PlayerPrefs.GetString("COOKIE");
            //Debug.Log("Cookies: " + sessionCookieString);

            if (string.IsNullOrEmpty(m_Sdk.developerToken))
            {
                NotificationManager.Instance.GenerateError("Invalid Developer Token!");
            }

            ArSpace.SetActive(showContentBeforeLocalization);
            destinationDropdown.SetActive(showContentBeforeLocalization);
        }
        //-------------------------- UI Manager ---------------------------------

        void Start()
        {
            m_Sdk = ArwaySDK.Instance;

            deleteMapURL = m_Sdk.ContentServer + EndPoint.DELETE_CLOUD_MAP;

            devToken = m_Sdk.developerToken;

            cloudListURL = m_Sdk.ContentServer + EndPoint.CLOUD_LIST;

            if (m_Sdk == null)
            {
                m_Sdk = GetComponentInParent <ArwaySDK>();
            }
        }
        public void Start()
        {
            Debug.Log("server: " + server);
            websocket = new WebSocket(server);

            m_Sdk = ArwaySDK.Instance;
            //Debug.Log("Cookies: " + sessionCookieString);

            if (string.IsNullOrEmpty(m_Sdk.developerToken))
            {
                NotificationManager.Instance.GenerateError("Invalid Developer Token!");
            }

            ArSpace.SetActive(showContentBeforeLocalization);
            destinationDropdown.SetActive(showContentBeforeLocalization);
            ConnectWS();
        }
Exemple #10
0
        void Start()
        {
            m_Sdk = ArwaySDK.Instance;

            if (m_Sdk.developerToken != null && m_Sdk.developerToken.Length > 0)
            {
                NotificationManager.Instance.GenerateNotification("Getting Cloud List..");
                StartCoroutine(GetCloudList());
            }
            else
            {
                NotificationManager.Instance.GenerateError("Invalid Developer Token!");
            }

            cloudDropdown = cloudDropdown.GetComponent <TMP_Dropdown>();
            cloudDropdown.options.Clear();
            cloudDropdown.options.Add(new TMP_Dropdown.OptionData("Select Cloud Map"));
        }
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            if (instance != this)
            {
                Debug.LogError("There must be only one ArwaySDK object in a scene.");
                UnityEngine.Object.DestroyImmediate(this);
                return;
            }

            if (developerToken != null && developerToken.Length > 0)
            {
                PlayerPrefs.SetString("token", developerToken);
            }
        }
Exemple #12
0
        void Start()
        {
            renderCameraFeed();

            m_Sdk = ArwaySDK.Instance;

            sessionCookieString = PlayerPrefs.GetString("COOKIE");
            //Debug.Log("Cookies: " + sessionCookieString);

            if (m_Sdk.developerToken != null && m_Sdk.developerToken.Length > 0)
            {
                NotificationManager.Instance.GenerateNotification("Getting Cloud List..");
                StartCoroutine(GetCloudList());
            }
            else
            {
                NotificationManager.Instance.GenerateError("Invalid Developer Token!");
            }

            cloudDropdown = cloudDropdown.GetComponent <TMP_Dropdown>();
            cloudDropdown.options.Clear();
            cloudDropdown.options.Add(new TMP_Dropdown.OptionData("Select Cloud Map"));
        }
Exemple #13
0
        void Start()
        {
            sessionCookieString = PlayerPrefs.GetString("COOKIE");

            dropdown = destinationDropdown.GetComponent <TMP_Dropdown>();
            dropdown.options.Clear();
            dropdown.options.Add(new TMP_Dropdown.OptionData("Select Destination"));

            filePath = $"{Application.persistentDataPath}/Files/test.glb";

            navController = this.GetComponent <NavController>();

            cloudMaps = new List <int>();

            if (mapped_Cloud_Id.Length > 0)
            {
                cloudMaps.Add(int.Parse(mapped_Cloud_Id));
            }

            m_Sdk = ArwaySDK.Instance;

            if (m_Sdk.developerToken != null && m_Sdk.developerToken.Length > 0)
            {
                isReadyToLocalize = CheckMapIdDetails();

                if (isReadyToLocalize)
                {
                    StartCoroutine(GetMapData(map_id));
                }

                m_ARSpace.SetActive(showContentBeforeLocalization);
                destinationDropdown.SetActive(showContentBeforeLocalization);
            }
            else
            {
                Debug.Log("***********\tDeveloper Token not valid!\t***********");
                NotificationManager.Instance.GenerateWarning("Error: " + "Invalid Developer Token!!");
            }

            if (m_ARSpace == null)
            {
                m_ARSpace = new GameObject("ARSpace");

                if (m_ARSpace == null)
                {
                    Debug.Log("No AR Space found");
                }
            }

            // Create WaypointsAndDestinations Group with an ARAnchor
            m_WaypointsAndDestinations = new GameObject("Waypoints & Destinations");
            m_WaypointsAndDestinations.transform.parent = m_ARSpace.transform;

            // Create 3D Models Group with an ARAnchor
            m_3DModels = new GameObject("3D Models");
            m_3DModels.transform.parent = m_ARSpace.transform;

            // Create Images Group with an ARAnchor
            m_Images = new GameObject("Images");
            m_Images.transform.parent = m_ARSpace.transform;

            // Create Text Group with an ARAnchor
            m_Texts = new GameObject("Texts");
            m_Texts.transform.parent = m_ARSpace.transform;
        }