Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
drash's avatar
drash
Heroic Explorer
13 years ago

Very minor issue in OVRMainMenu.cs

In OVRMainMenu's Awake():

		// Find player controller
OVRPlayerController[] PlayerControllers;
PlayerControllers = gameObject.GetComponentsInChildren<OVRPlayerController>();

if(PlayerControllers.Length == 0)
Debug.LogWarning("OVRMainMenu: No OVRPlayerController attached.");
else if (CameraControllers.Length > 1)
Debug.LogWarning("OVRMaunMenu: More then 1 OVRPlayerController attached.");
else
PlayerController = PlayerControllers[0];


The main issue here is that it's checking CameraControllers.Length > 1 instead of PlayerControllers.Length, and the second nitpicky issue is that OVRMaunMenu should be OVRMainMenu.