void Update() { if (m_TrackableSettings == null) { Debug.LogError("TRacquierand"); } if (m_ActiveModel == null) { Debug.LogError("Modelaodw2"); } if (m_TrackableSettings.IsDeviceTrackingEnabled() && (m_ActiveModel == m_DefaultModel)) { // Switch default augmentation to extended tracking augmentation m_DefaultModel.SetActive(false); m_ExtendedModel.SetActive(true); m_ActiveModel = m_ExtendedModel; } else if (!m_TrackableSettings.IsDeviceTrackingEnabled() && (m_ActiveModel == m_ExtendedModel)) { // Switch extended tracking augmentation to default augmentation m_ExtendedModel.SetActive(false); m_DefaultModel.SetActive(true); m_ActiveModel = m_DefaultModel; } }
void Update() { if (m_TrackableSettings.IsDeviceTrackingEnabled()) { Debug.Log("sound"); AudioManagerScript.current.PlaySound(musicFx); foreach (Animator animator in myAnimator) { animator.speed = 1f; animator.gameObject.SetActive(true); } } else { // stoppo la musica AudioManagerScript.current.StopSound(); // Debug.Log("stoppo"); foreach (Animator animator in myAnimator) { animator.gameObject.SetActive(false); } } }
void Update() { if (m_TrackableSettings.IsDeviceTrackingEnabled() && (m_ActiveModel == m_DefaultModel)) { // Switch default augmentation to extended tracking augmentation m_DefaultModel.SetActive(false); m_ExtendedModel.SetActive(true); m_ActiveModel = m_ExtendedModel; } else if (!m_TrackableSettings.IsDeviceTrackingEnabled() && (m_ActiveModel == m_ExtendedModel)) { // Switch extended tracking augmentation to default augmentation m_ExtendedModel.SetActive(false); m_DefaultModel.SetActive(true); m_ActiveModel = m_DefaultModel; } }
public void UpdateUI() { if (m_DeviceTrackerToggle && m_TrackableSettings) { m_DeviceTrackerToggle.isOn = m_TrackableSettings.IsDeviceTrackingEnabled(); } if (m_FlashToggle && m_CameraSettings) { m_FlashToggle.isOn = m_CameraSettings.IsFlashTorchEnabled(); } if (m_AutofocusToggle && m_CameraSettings) { m_AutofocusToggle.isOn = m_CameraSettings.IsAutofocusEnabled(); } }