-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The UnityLoader was not defined #1
Comments
@AlicanBalik @votetake Were there ever any solutions determined? My issue is the following and can't seem to get it resolved: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. |
No, there was no solution and it hasn't been solved. I tried 3 different approaches as I remember when I was having this issue. If it gets solved, I will use this again. |
@AlicanBalik is
This problem in your configuration, not in VUE component |
I had similar issue with Webpack+angular. I had to add the src .js file path in the top-level index.html <script src="../../assets/Built-WebGL/Build/UnityLoader.js"></script> <script src="../../assets/Built-WebGL/TemplateData/UnityProgress.js"></script>Ideally the toolchain, webpack config etc should have taken care of this. I do not know if it solves the problem for you. |
@AlicanBalik @ishwara-bhat I had a similar issue, but I resolved it. |
I am trying to run my WebGL application in Vue.js(version: 2.8.2).
unityLoader
attribute doesn't see the path somehow. I tried 3 different ways but all of them showed me the same error and I wonder if there is any solution.The UnityLoader was not defined, please add the script tag to the base html and embed the UnityLoader.js file Unity exported or use "unityLoader" attribute for path to UnityLoader.js.
Things I have tried:
Adding
UnityLoader.js
in HTML:<script type="javascript" src="../assets/games/game1/Build/UnityLoader.js"></script>
Using
require()
function inHome.vue
:require('../assets/games/game1/Build/UnityLoader.js');
Adding the script tag in
index.html
:After adding it in
index.html
, I got a different error:GET http://localhost:9292/assets/games/game1/Build/UnityLoader.js net::ERR_ABORTED
Home.Vue with first try:
The text was updated successfully, but these errors were encountered: