Today, we are going to make a youtube video play in a 3d scene in unreal engine. You could use this to make it look like the youtube video is playing on a tv you have in your game, or something like that. The first thing that you need to do is open an Unreal engine project. Go to the edit menu in the top left corner, and press plugins. You need to enable the web browser plugin. Once it is enabled, and you restart the project, create a widget (right click in the content area and hover over “user interface”, and press widget). Open your widget, and go to the sidebar for where you add things into your widget, and search for “web browser”. Make the web browser take up the entire widget. You can do this by pressing the drop down menu called anchors, and pick the one that looks like the entire rectangle. Set the four values below that to zero. After this, you need to pick what youtube video you are going to use in your game. For this example, I am going to use one of my videos. Go to the youtube video you want, and press on the share button, near the like or dislike buttons. Press on the embed button. It will give you a long text, but all you need is the url near the beginning of it that will start with https://www.youtube.com. Go to that link in a new tab, and add ?autoplay=1 to the end of the url. When this is done correctly, the video will play when you open that url. Now, you need to go back to unreal engine, and put in the url that we were just at with the autoplay enabled into the url field in the right of the settings for the web browser in your widget. At this point, you have a widget that will play your video, but we want it to play in your 3D world. To do this, go back to your content area of your unreal engine project, and right click and pick blueprint class, and then select actor. Open your actor, and press the add component button, and select widget. On the right hand side, you can pick the widget that we just made. Now, if you drag this actor into your scene, you will see the youtube video play. If you have any questions, press the contact me button in the top menu.

Leave a Reply

Your email address will not be published. Required fields are marked *


unrealcousinzzz.net




coppyright 2020 The Unreal Cousinzzz