- Home /
Can you serialize custom camera projection matrices?
I need to set up custom camera projections. Upon hitting Play, they are replaced, as if Camera.ResetProjectionMatrix() were invoked. I can override that by storing the custom projection matrices in variables, and assigning them to the cameras in Start() (or some other function), but I'd rather not. Do I have a choice?
Answer by Joachim Ante · Jan 24, 2010 at 05:58 PM
The projection matrices are not serialized in the camera class. If you want to store them you need to store it in a public variable in one of your scripts and assign them in Start or Awake.
I also learned that they don't persist after hitting Stop, either. Please change this in a future Unity release.
Your answer
Follow this Question
Related Questions
fluent animation from orthographic to perspective projection 2 Answers
How to make camera position relative to a specific target. 1 Answer
Setting the camera projection matrix does nothing 0 Answers
How do I get an off-center camera view, without breaking FOV & aspect ratio? 1 Answer
Does the projection matrix calculation affect the shader? 1 Answer