How to save/load character's camera rotation correctly?

EVG

Member
How to save/load character's camera rotation correctly?
Now I save the player's rotation like this:
C#:
transform.rotation
And load the saved data:
C#:
ultimateCharacterLocomotion.SetRotation(saved data)
But this only saves the rotation of the character, not the camera. There is no SetRotation method for the camera. What is the correct way to insert a stored Pitch value for a camera?
UCC 2
 
On the CameraController you can use GetViewType to access to the ViewType, then save off the pitch and yaw values. You'd restore those values when you want to load.
 
Ah, I see. In that case go ahead and change it so there's a setter. Version 2 won't be getting any more updates so there's no reason not to change the direct source now.
 
Top