I have searched this forum and looked at a few of the demo projects like this:
https://playcanvas.com/editor/scene/828873
I tried copying the example by doing the following:
- Creating a new element, adding a new script “ui.js”
- Creating a new HTML script asset named header.html
- Creating a new CSS script asset named style.css
- Coping the code from the example above to my project script assets (ui.js, html, css)
Still, when I run the code I get no errors and no UI. Also the attributes.add doesn’t appear to be working in my script because in my html+css element i don’t have the HTML and CSS attribute as pictured below:
Example
My Project
Could anyone please give me the piece that I am missing? Here is my project: