Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How to Play a Video From a URL in Unity (Works With Webgl)

Автор: Max O'Didily

Загружено: 2023-12-29

Просмотров: 6235

Описание:

How to Play a Video From a URL in Unity (Works With Webgl)

Greetings, in this unity tutorial we shall be looking at how to play a video from a url in Unity. This tutorial will work with Unity WebGL games and is a great solution to playing a video in WebGL if you don't want to use the Streaming Assets folder.

So in this Unity video we will be playing a video from a url, this url contains the video we want to play in Unity. This video will be hosted on an external website. We will be using GitHub pages but you can use other hosts.

Here is a tutorial on how to host a video on github pages for free:    • Host a Video on Github Pages for Free  

This tutorial will show you how to stream a video from a website using Unity.

Now to play a video that is hosted on a website in Unity, we need to create a video player script. This script will allow us to assign the url of our video we want to play, disable play on awake and let us call the prepare video function.

The prepare function for the unity video player prepares the video for streaming, once the video is ready to be streammed, it will broadcast the prepareCompleted event. We can subscribe to this event and call the Play() function from the videoplayer to start playing the video when ready.

With the custom video player script set up, we can create a video texture and hook that videotexture up to a raw UI image and our video player component. You can use a regualr UI image if you wish but the raw UI image setup allows us to play a video in Unity WebGL.

One important thing to note, you can't use this tutorial on how to play a video from the internet with a youtube video as the url needs to for the video file itself (which would include the .mp4 or whatever at the end). YouTube doesn't expose urls for the videos themselves, so you have to host a video elsewhere. Like on GitHub pages, which is free.

But that is it for playing a video from a url in Unity that is hosted on the internet. As you can see it is simple to use the unity videoplayer to stream a video from a website.

Thanks for watching this tutorial on how to load a video from url across internet and play it on unity as 2D UI or a 3D object's texture.

If this video on how to play a video from a url in Unity that also works in unity webgl, then be sure to subscribe to keep notified when I upload.

Play video from URL Unity
How to get unity videoplayer component to play video from a url
How to Play a Video From a URL in Unity (Works With Webgl)

How to Play a Video From a URL in Unity (Works With Webgl)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

How to Play a Video in Unity WebGL (Simple)

How to Play a Video in Unity WebGL (Simple)

НЕЙРОСЕТИ VS BLENDER 3D / МЫ ПРОИГРАЛИ

НЕЙРОСЕТИ VS BLENDER 3D / МЫ ПРОИГРАЛИ

Antigravity от Google: AI, который сам бесплатно прокачал мой сайт: SEO, скорость, контент

Antigravity от Google: AI, который сам бесплатно прокачал мой сайт: SEO, скорость, контент

БЕЗ VPN👉 ТОП ОБНОВЛЕНИЕ Как обойти ВСЕ блокировки на Андроид! Обход блокировки Воцап, Ютуб, Телега

БЕЗ VPN👉 ТОП ОБНОВЛЕНИЕ Как обойти ВСЕ блокировки на Андроид! Обход блокировки Воцап, Ютуб, Телега

How to Play a Video on a UI Canvas in Unity Webgl (Simple)

How to Play a Video on a UI Canvas in Unity Webgl (Simple)

Unity WebGL Build and Hosting on GitHub

Unity WebGL Build and Hosting on GitHub

Как СОЗДАТЬ Игру С НУЛЯ Простыми Словами | Unity #1

Как СОЗДАТЬ Игру С НУЛЯ Простыми Словами | Unity #1

Первый взгляд на новый одноплатный компьютер Orange pi 4 pro. Тест производительности.

Первый взгляд на новый одноплатный компьютер Orange pi 4 pro. Тест производительности.

Сделал визуализацию 4D, 5D, 6D. Как выглядит 6D мир?

Сделал визуализацию 4D, 5D, 6D. Как выглядит 6D мир?

Stream Live Video from Mobile Phone Camera with Python and Open CV

Stream Live Video from Mobile Phone Camera with Python and Open CV

My Favorite way to Click on GameObjects

My Favorite way to Click on GameObjects

Программирование на ассемблере без операционной системы

Программирование на ассемблере без операционной системы

Освещение в Unreal Engine 5 для начинающих

Освещение в Unreal Engine 5 для начинающих

Step 0_Surface tracking (Web AR in Unity)

Step 0_Surface tracking (Web AR in Unity)

Build Your Unity VR Game for Oculus!

Build Your Unity VR Game for Oculus!

How To Make A 360 Video Player With Unity For VR

How To Make A 360 Video Player With Unity For VR

Выбор игрового движка на самом деле прост

Выбор игрового движка на самом деле прост

Как добавить музыку и звуковые эффекты в игру на Unity | Урок по платформеру Unity 2D №16

Как добавить музыку и звуковые эффекты в игру на Unity | Урок по платформеру Unity 2D №16

Как превратить 2D-изображения в настоящие 3D-модели с помощью ИИ

Как превратить 2D-изображения в настоящие 3D-модели с помощью ИИ

Клеточные Автоматы на частицах

Клеточные Автоматы на частицах

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com