Skip to content

Commit c4d5a3e

Browse files
committed
Fixed VideoPlayer error while opening in 2017 version
1 parent b3270ae commit c4d5a3e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Assets/Scripts/Editor/ContextMenu/GetVideoAspectRatioEditor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ static void DoubleMass(MenuCommand command)
1919
Debug.LogError("No videoclip assigned..");
2020
return;
2121
}
22+
#if UNITY_2017
23+
float aspectRatioY = v.texture.height / (float)v.texture.width;
24+
#else
2225
float aspectRatioY = v.height / (float)v.width;
26+
#endif
27+
2328

2429
// record undo
2530
Undo.RecordObject(v.transform, "Set scale");

0 commit comments

Comments
 (0)