Things to note when using Unity to develop web applications
Unity is a cross-platform game engine, which means that we can deploy games that use the same code base and resources on different platforms, including WebGL. However, if you are using Unity to develop games for the web platform, here are some notes about implementing a video player.
URL
First of all, the VideoPlayer.clip
property is not supported on WebGL, which means that you can implement your video player solution by playing the video content in the video clip assets in the editor. However, once you build and deploy your web application to the server and run it, the video will not be played, even if the required video assets are packaged and deployed together.
As shown in Figure 6.42, when we run the web app and click the Play Video button, nothing will happen.
In this case, we have to provide a video source via the VideoPlayer.url
property instead. If the video...