8
2019
Set Quad Scale to Match VideoPlayer Aspect Ratio
Needed quick videoplayer quad mesh resizer, to match video size, so here’s a small editor helper script:
https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Editor/ContextMenu/GetVideoAspectRatioEditor.cs
It checks video width and height, and then scales transform Y axis to match aspect ratio.
Related Posts
Leave a comment
Recent posts
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)