🌍 Unity/VR, AR
unity 2017.3 vuforia disable
맨텀
2018. 3. 27. 18:04
다음과 같이 선언하면 OFF 가능. 뷰포리아가 없는 씬에서만 해주면됨. 뷰포리아 있는씬으로 가면 활성화됨.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | using Vuforia; if (mainCamera) { if (mainCamera.GetComponent<VuforiaBehaviour>() != null) { mainCamera.GetComponent<VuforiaBehaviour>().enabled = false; } if (mainCamera.GetComponent<VideoBackgroundBehaviour>() != null) { mainCamera.GetComponent<VideoBackgroundBehaviour>().enabled = false; } if (mainCamera.GetComponent<DefaultInitializationErrorHandler>() != null) { mainCamera.GetComponent<DefaultInitializationErrorHandler>().enabled = false; } //mainCamera.clearFlags = CameraClearFlags.Skybox; } | cs |
video texture만 끄기
1 2 3 4 5 | BackgroundPlaneBehaviour bgPlane = GameObject.Find("BackgroundPlane").GetComponent<BackgroundPlaneBehaviour>(); if (bgPlane.enabled) { bgPlane.enabled = false; } | cs |
FrameRateSettings 에서 타겟프레임을 설정하고있으니,
60 으로 바꿔준다. 의미없음.