public void OnClickBack() { TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); Item_1_Refrigerator.SetActive(false); Item_2_TV_TableTop.SetActive(false); Item_3_Sofa.SetActive(false); Item_4_Table.SetActive(false); Item_5_TV_WallMount.SetActive(false); Item_6_Watch.SetActive(false); Item_7_Statue.SetActive(false); objectPlacedInAR = false; PlaneTrackingLoading_Panel.SetActive(false); placeInAR = false; Item_1_Refrigerator.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_2_TV_TableTop.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_3_Sofa.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_4_Table.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_5_TV_WallMount.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_6_Watch.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_7_Statue.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_1_Refrigerator.GetComponent <LeanDragTranslate>().enabled = false; Item_2_TV_TableTop.GetComponent <LeanDragTranslate>().enabled = false; Item_3_Sofa.GetComponent <LeanDragTranslate>().enabled = false; Item_4_Table.GetComponent <LeanDragTranslate>().enabled = false; Item_5_TV_WallMount.GetComponent <LeanDragTranslate>().enabled = false; Item_6_Watch.GetComponent <LeanDragTranslate>().enabled = false; Item_7_Statue.GetComponent <LeanDragTranslate>().enabled = false; ResetPosition(); StartCoroutine(LoadProductDescription(currentProduct)); }
public IEnumerator LoadingTryARPage(int productID) { LoadingPage_Panel.SetActive(true); DescriptionPage_Item_1.SetActive(false); DescriptionPage_Item_2.SetActive(false); DescriptionPage_Item_3.SetActive(false); DescriptionPage_Item_4.SetActive(false); DescriptionPage_Item_5.SetActive(false); DescriptionPage_Item_6.SetActive(false); DescriptionPage_Item_7.SetActive(false); Item_1_Refrigerator.SetActive(false); Item_2_TV_TableTop.SetActive(false); Item_3_Sofa.SetActive(false); Item_4_Table.SetActive(false); Item_5_TV_WallMount.SetActive(false); Item_6_Watch.SetActive(false); Item_7_Statue.SetActive(false); DescriptionCamera.SetActive(false); if (productID == 1) { PlaneTrackingCamera.SetActive(true); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(true); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); } else if (productID == 2) { PlaneTrackingCamera.SetActive(true); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(true); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); } else if (productID == 3) { PlaneTrackingCamera.SetActive(true); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(true); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); } else if (productID == 4) { PlaneTrackingCamera.SetActive(true); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(true); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); } else if (productID == 5) { PlaneTrackingCamera.SetActive(true); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(true); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); } else if (productID == 6) { PlaneTrackingCamera.SetActive(false); ImageTracking_1_Camera.SetActive(true); ImageTracking_2_Camera.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(true); TryARPage_Item_7.SetActive(false); } else if (productID == 7) { PlaneTrackingCamera.SetActive(false); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(true); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(true); } ResetPosition(); if (productID != 6 && productID != 7) { placementController.placementIsValid = false; objectPlacedInAR = false; } yield return(new WaitForSeconds(4)); Transition.SetActive(true); if (productID != 6 && productID != 7) { PlaneTrackingLoading_Panel.SetActive(true); } LoadingPage_Panel.SetActive(false); Transition.GetComponent <Image>().color = new Color(1, 1, 1, 1); for (float t = 0.0f; t < 1.0f; t += Time.deltaTime) { Color newColor = new Color(1, 1, 1, Mathf.Lerp(1, 0, t)); Transition.GetComponent <Image>().color = newColor; yield return(null); } Transition.SetActive(false); if (productID != 6 && productID != 7) { yield return(new WaitUntil(() => placementController.placementIsValid == true)); placeInAR = true; PlaneTrackingLoading_Panel.SetActive(false); } }
// Start is called before the first frame update void Start() { Screen.orientation = ScreenOrientation.Portrait; placementController = placementBase.GetComponent <PlacementController>(); LoadingPage_Panel.SetActive(true); HomePage_Panel.SetActive(false); StartCoroutine(StartLoading()); DescriptionCamera.SetActive(true); PlaneTrackingCamera.SetActive(false); ImageTracking_1_Camera.SetActive(false); ImageTracking_2_Camera.SetActive(false); Item_1_Refrigerator.SetActive(false); Item_2_TV_TableTop.SetActive(false); Item_3_Sofa.SetActive(false); Item_4_Table.SetActive(false); Item_5_TV_WallMount.SetActive(false); Item_6_Watch.SetActive(false); Item_7_Statue.SetActive(false); DescriptionPage_Item_1.SetActive(false); DescriptionPage_Item_2.SetActive(false); DescriptionPage_Item_3.SetActive(false); DescriptionPage_Item_4.SetActive(false); DescriptionPage_Item_5.SetActive(false); DescriptionPage_Item_6.SetActive(false); DescriptionPage_Item_7.SetActive(false); TryARPage_Item_1.SetActive(false); TryARPage_Item_2.SetActive(false); TryARPage_Item_3.SetActive(false); TryARPage_Item_4.SetActive(false); TryARPage_Item_5.SetActive(false); TryARPage_Item_6.SetActive(false); TryARPage_Item_7.SetActive(false); PlaneTrackingLoading_Panel.SetActive(false); Item_1_Refrigerator.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_2_TV_TableTop.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_3_Sofa.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_4_Table.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_5_TV_WallMount.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_6_Watch.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_7_Statue.GetComponent <LeanTwistRotateAxis>().enabled = false; Item_1_Refrigerator.GetComponent <LeanDragTranslate>().enabled = false; Item_2_TV_TableTop.GetComponent <LeanDragTranslate>().enabled = false; Item_3_Sofa.GetComponent <LeanDragTranslate>().enabled = false; Item_4_Table.GetComponent <LeanDragTranslate>().enabled = false; Item_5_TV_WallMount.GetComponent <LeanDragTranslate>().enabled = false; Item_6_Watch.GetComponent <LeanDragTranslate>().enabled = false; Item_7_Statue.GetComponent <LeanDragTranslate>().enabled = false; Item_1_Refrigerator_Transform = Item_1_Refrigerator.transform; Item_2_TV_TableTop_Transform = Item_2_TV_TableTop.transform; Item_3_Sofa_Transform = Item_3_Sofa.transform; Item_4_Table_Transform = Item_4_Table.transform; Item_5_TV_WallMount_Transform = Item_5_TV_WallMount.transform; Item_6_Watch_Transform = Item_6_Watch.transform; Item_7_Statue_Transform = Item_7_Statue.transform; }