Skip to content

Commit

Permalink
No need to do any changes when the application isn't starts for resiz…
Browse files Browse the repository at this point in the history
…able screen.
  • Loading branch information
jcs090218 committed Sep 12, 2018
1 parent bfd1829 commit 2c90d26
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Assets/JCSUnity/Scripts/Settings/JCS_ScreenSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,14 @@ private void Awake()

private void Start()
{
Camera cam = JCS_Camera.main.GetCamera();

// NOTE(jenchieh): Here is the execution order implementation.
// 'APPLICATION_STARTS' will be true after the first scene's
// main game loop is runs.
if (JCS_ApplicationSettings.instance.APPLICATION_STARTS)
// When first run in the application...
if (!JCS_ApplicationSettings.instance.APPLICATION_STARTS)
{
cam.fieldOfView = FIELD_OF_VIEW;
cam.orthographicSize = ORTHOGRAPHIC_SIZE;
Camera cam = JCS_Camera.main.GetCamera();

// Update the data just to see better.
ORTHOGRAPHIC_SIZE = cam.orthographicSize;
FIELD_OF_VIEW = cam.fieldOfView;
}
}

Expand Down

0 comments on commit 2c90d26

Please sign in to comment.