Skip to content

Commit 2c90d26

Browse files
committed
No need to do any changes when the application isn't starts for resizable screen.
1 parent bfd1829 commit 2c90d26

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Assets/JCSUnity/Scripts/Settings/JCS_ScreenSettings.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,14 @@ private void Awake()
177177

178178
private void Start()
179179
{
180-
Camera cam = JCS_Camera.main.GetCamera();
181-
182-
// NOTE(jenchieh): Here is the execution order implementation.
183-
// 'APPLICATION_STARTS' will be true after the first scene's
184-
// main game loop is runs.
185-
if (JCS_ApplicationSettings.instance.APPLICATION_STARTS)
180+
// When first run in the application...
181+
if (!JCS_ApplicationSettings.instance.APPLICATION_STARTS)
186182
{
187-
cam.fieldOfView = FIELD_OF_VIEW;
188-
cam.orthographicSize = ORTHOGRAPHIC_SIZE;
183+
Camera cam = JCS_Camera.main.GetCamera();
184+
185+
// Update the data just to see better.
186+
ORTHOGRAPHIC_SIZE = cam.orthographicSize;
187+
FIELD_OF_VIEW = cam.fieldOfView;
189188
}
190189
}
191190

0 commit comments

Comments
 (0)