Skip to content

Commit

Permalink
Replace validity check obsolete in Recorder v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mminer committed Jun 22, 2023
1 parent 00f51de commit 8be8a18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions Editor/BigCameraInputSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,34 @@ public override int OutputWidth
public int TileHeight => OutputHeight / Rows;
public int TileWidth => OutputWidth / Columns;

protected override bool ValidityCheck(List<string> errors)
protected override void CheckForErrors(List<string> errors)
{
var ok = true;
base.CheckForErrors(errors);

if (Columns < 1 || Rows < 1)
{
errors.Add($"Need at least one row and column.");
ok = false;
errors.Add($"Need at least one row and one column.");
}

if (OutputWidth % Columns != 0)
{
errors.Add($"Output width must be a multiple of the columns.");
ok = false;
}

if (OutputHeight % Rows != 0)
{
errors.Add($"Output height must be a multiple of the rows.");
ok = false;
}

if (OutputWidth <= 0 || OutputHeight <= 0)
{
errors.Add($"Invalid output resolution: {OutputWidth}x{OutputHeight}");
ok = false;
}

if (TileWidth > SystemInfo.maxTextureSize || TileHeight > SystemInfo.maxTextureSize)
{
errors.Add($"Tile size exceeds the maximum texture size ({SystemInfo.maxTextureSize}).");
ok = false;
}

return ok;
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"unity": "2020.3",
"description": "Recorder to capture image sequences that exceed Unity's maximum texture size.",
"dependencies": {
"com.unity.recorder": "2.5.0"
"com.unity.recorder": "3.0.0"
}
}

0 comments on commit 8be8a18

Please sign in to comment.