void Start() { dropdown = dropdown.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("***********\tDeveloper Token not valid!\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; }
private void Start() { // Get reference to NavController Script navController = gameObject.GetComponent <NavController>(); // Get Main Camera reference m_MainCamera = Camera.main.gameObject; // Set first target to main camera position m_Target = new Vector3(m_MainCamera.transform.position.x, m_MainCamera.transform.position.y - 1, m_MainCamera.transform.position.z) + transform.forward; // Instantiate Character Guide Set it's animation to Idle m_CharacterGuide = Instantiate(m_CharacterGuide, m_Target, Quaternion.identity) as GameObject; m_CharacterAnimator = m_CharacterGuide.GetComponent <Animator>(); m_CharacterAnimator.SetTrigger("idle"); m_CharacterGuide.SetActive(false); // Get Target Vector3 coordinates StartCoroutine(NextVal()); }
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; }