Modifying default initial HTML on the editor

Hello everybody,

I’m trying to use some external libraries to recognize people through the webcam and make display in a 3d element through a video component. I have managed to make it work but only in a build, I have not managed to make it work in the editor.

The only way to make it work is to modify the index.html of the build adding this line:

Obviously this is not optimal since every time I want to test I have to build the whole application.

I have tried creating the video component at runtime by running this code as soon as I can by setting it the first on scripts loading order but I have not been able to get it to work:

let m_video = document.createElement('video')
m_video.setAttribute("src", "")
m_video.setAttribute("id", "video")

Is there any way to edit the initial HTML in the editor?
Or any way to get it to work?

You can provide links to external libraries in the project settings. Those libraries will be loaded before the application starts.

You can also put that library into your assets and mark it to load after engine in the inspector panel.

1 Like