为什么我的视频在Android智能手机中播放,而是在Unity编辑中播放

发布于 2025-02-01 18:26:59 字数 579 浏览 4 评论 0原文

我想在Unity中播放垂直视频或肖像视频。我跟随此教程视频您在UI帆布中创建原始图像。在Hierarcy中,您添加一个空的视频播放器GameObject。然后,在项目窗口中,您右键单击并创建渲染纹理。您将渲染纹理拖到视频播放器和原始图像中的纹理字段中的目标纹理字段。

但是问题是创建一个我能够在我的Unity编辑器游戏视图中玩耍,但是当我在智能手机上构建时,它并没有播放。

根据一些建议,我将视频中的编解码器从自动变为VP8,但根本没有更改。

我看到这个答案 ,但是我没有编写任何代码。我所做的就是按照那段视频。

I want to play a vertical video or a portrait video in Unity. I followed this tutorial and was successfully able to implement .As per the video you create a raw image in the UI canvas. In the hierarcy you add an empty video player gameobject. Then in the project window you right click and create a render texture. You drag the render texture to the Target texture field in the Video player and the texture field in the raw image.

But the problem is create a I am able to play in my game view of Unity Editor but when I build on smartphone , it is not playing.

As per some suggestion I changed Codec of the video in the inspector from Auto to VP8 but there was no change at all.

I saw this answer, but I have not written any code as such. What I have done is as per that video.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文