Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 17f06c7

Browse files
fix screen size tip
1 parent 5fbed92 commit 17f06c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Assets/Scripts/ScreenRecorder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public void StopRecording()
2727
bool isRecording = false;
2828
IEnumerator CaptureScreen(string maidata_path)
2929
{
30-
if (Screen.width % 2 != 0)
30+
if (Screen.width % 2 != 0 || Screen.height % 2 != 0)
3131
{
32-
GameObject.Find("ErrText").GetComponent<Text>().text = "无法开始编码,因为分辨率宽度不是偶数\nCan not start render because the width is not even.\n当前分辨率:"+Screen.width+"x"+Screen.height+"\n";
32+
GameObject.Find("ErrText").GetComponent<Text>().text = "无法开始编码,因为分辨率宽度或高度不是偶数\nCan not start render because the width/height is not even.\n当前分辨率:"+Screen.width+"x"+Screen.height+"\n";
3333
}
3434
if (File.Exists(maidata_path + "\\out.mp4"))
3535
File.Delete(maidata_path + "\\out.mp4");

0 commit comments

Comments
 (0)