Skip to content

Commit

Permalink
fix screen size tip
Browse files Browse the repository at this point in the history
  • Loading branch information
LingFeng-bbben committed Mar 21, 2023
1 parent 5fbed92 commit 17f06c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Scripts/ScreenRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public void StopRecording()
bool isRecording = false;
IEnumerator CaptureScreen(string maidata_path)
{
if (Screen.width % 2 != 0)
if (Screen.width % 2 != 0 || Screen.height % 2 != 0)
{
GameObject.Find("ErrText").GetComponent<Text>().text = "无法开始编码,因为分辨率宽度不是偶数\nCan not start render because the width is not even.\n当前分辨率:"+Screen.width+"x"+Screen.height+"\n";
GameObject.Find("ErrText").GetComponent<Text>().text = "无法开始编码,因为分辨率宽度或高度不是偶数\nCan not start render because the width/height is not even.\n当前分辨率:"+Screen.width+"x"+Screen.height+"\n";
}
if (File.Exists(maidata_path + "\\out.mp4"))
File.Delete(maidata_path + "\\out.mp4");
Expand Down

0 comments on commit 17f06c7

Please sign in to comment.