Hi I am trying to follow the tutorial found in https://playcanvas.com/project/405850/overview/tutorial-video-textures to play a video, I did exactly the same as the tutorial with the same scripts used and when I launch the game and inspect the page it says script ‘preloadVideo’ is not found, awaiting it to be added to registry in the inspect. Please advice
Can you please share your project so I can take a look?
can you tell me your username to add you please?
Sure, it’s leonidas.
Done , Please check
From what I’m seeing in your project, you have some noticeable errors on the script, that’s plain JS and not in the Playcanvas format, which is expected by the parser. To be attached to a Playcanvas entity.
I will advice you to take a look again on the manual here: https://developer.playcanvas.com/en/user-manual/scripting/
It explains the exact structure a Playcanvas script should have.
The script I am using is the same as the one in the tutorial, I just copied & pasted it.
You have added a video_texture.js script in your assets, which still isn’t a pc.Script. Where did you find this?
Here is how it’s supposed to look, taken from the tutorial project:
Also attached to the entity you have the preload_video.js, not that.
Can you please send me the tutorial link, it seems like I am using an outdated one
Sure, here you go:
Thanks It got solved,