This works pretty well when i run this in Editor’s Game Window.
But when i build this project and run .exe
then there is no view matrix change
So i debugged this.
And i found that it seems Camera.main.orthographic property is changing well in built exe. False to True, True to False, but view doesn’t show that matrix (maybe).
Why this happen and how can i fix this?
I’m using Unity 2020.3.33f1 Personal and Project’s Render Pipeline is URP.
oh well, now i got this.
First, as you said i tested it, then the framerate average became a little bit lower.
And my problem, the main camera doesn’t change to orthographic actually,
the script of camera interface needs
public Camera
variable to be changed to orthographic.
When i do this with
Camera.main.orthographic = true;
the Editor’s Game simulate works well but not the built one.
But with specific variable of camera that i want to change projection mode, like
public Camera mainCamera;
mainCamera.orthographic = true;
This works well Editor and Built exe both.
Maybe Camera.main.~~ things is supposed to search Main Camera in current view, not that camera i want to search as main, So… i have to set SPECIFIC camera to the script.