Forum Discussion
marky1124
13 years agoExplorer
OVRCameraController.cs - UnityEngine.Camera.fov is obsolete
Hi,
The following warning is displayed in Unity v4.2.0f4 when running the Oculus Tuscany Demo Project (OculusUnityIntegrationTuscanyDemo.unitypackage) found in SDK v0.2.3 :-
Assets/OVR/Scripts/OVRCameraController.cs(207,24): warning CS0618: `UnityEngine.Camera.fov' is obsolete: `use Camera.fieldOfView instead.'
Obviously it's a trivial issue at the moment, but it might be worth updating it before your next SDK release.
Cheers,
Mark
The following warning is displayed in Unity v4.2.0f4 when running the Oculus Tuscany Demo Project (OculusUnityIntegrationTuscanyDemo.unitypackage) found in SDK v0.2.3 :-
Assets/OVR/Scripts/OVRCameraController.cs(207,24): warning CS0618: `UnityEngine.Camera.fov' is obsolete: `use Camera.fieldOfView instead.'
Obviously it's a trivial issue at the moment, but it might be worth updating it before your next SDK release.
Cheers,
Mark
4 Replies
Replies have been turned off for this discussion
- DevilInsideProtegeYeah, there's work that needs to be done on the Unity integration kit.
An example of unoptimized code:gameObject.camera.transform.Rotate(...)
You can actually access the same transform by just callingtransform.Rotate(...)
Or even better, cache the transform in the awake method, and access the cached reference:
private Transform myTransform;
void Awake()
{
myTransform = GetComponent<Transform>();
}
void Update()
{
myTransform.Rotate(...)
} - ajboucherHonored Guesti know little to nothing about code, so ill bite the bullet ans ask are these solutions to the error if so could you show me where int the code for the overcameracontroller.cs i need to implement these changes. sorry for not understanding the code. and thanks for any help and advice.
- brendenfrankHonored GuestThey aren't errors, just warnings. This means that you could likely do nothing and be fine for the next few versions of unity.
If you'd like to manually do something about them, the warnings should show up in your console. Simply double clicking the warning will open the script and take you to the line. - ajboucherHonored Guestahh ok thanks for the quick response, if its not necessary to fix then i will leave it to the developers capable hands to address the error so i dont mess it all up.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 7 years ago
- 13 years ago