Skip to content

Commit e2ea356

Browse files
committed
Fix compiler error for Unity 5.4 or below.
Rect.zero is introduced from Unity 5.5. Using it will cause compiler error when compiling for Unity 5.4 or below. Change the checking to check Rect.width and Rect.height instead. Change-Id: I53d05e9c65bad2ae3000b8b284214b2f13dbc6ba
1 parent 6cef4b5 commit e2ea356

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/VersionHandlerImpl/src/DialogWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ void OnGUI() {
320320
// Adjust the dialog window size according to the rendered content.
321321
// Rect returned by BeginVertical() can be zeroes for a couple of frames, therefore
322322
// ignoring resizing for those frames.
323-
if (rect != Rect.zero) {
323+
if (rect.width != 0.0f && rect.height != 0.0f) {
324324
// Additional space at the bottom of the window.
325325
const float FILLER_WINDOWS_HEIGHT = 15.0f;
326326
float windowHeight = rect.height + FILLER_WINDOWS_HEIGHT;

0 commit comments

Comments
 (0)