Xetar Posted November 19, 2017 Share Posted November 19, 2017 Hello ! I'm working on a game and I need to the GUI extension. So, as needed, I added this line Quote <script src="https://preview.babylonjs.com/gui/babylon.gui.js"></script> after including the babylon.js file, I made run my script but I get this error Quote "TypeError: scene.onPreKeyboardObservable is undefined" And "Source map error: request failed with status 404 Resource URL: https://preview.babylonjs.com/gui/babylon.gui.js Source Map URL: button.js.map" in the console It's been yesterday I was looking for the answer but I did'nt find any Please help me, Thanks ! Quote Link to comment Share on other sites More sharing options...
brianzinn Posted November 20, 2017 Share Posted November 20, 2017 hi. there's a working version here: http://www.babylonjs.com/demos/gui/ Are you loading (order of scripts in the html page) babylon.gui.js after babylon.js? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 20, 2017 Share Posted November 20, 2017 Be careful to use version 3.0 or 3.1 of BabylonJS Quote Link to comment Share on other sites More sharing options...
Xetar Posted November 20, 2017 Author Share Posted November 20, 2017 Yes, I included babylon.gui.js after babylon.js file (like this : ) Quote <script src="/Babylonjs/babylon.js"></script> <script src="https://preview.babylonjs.com/gui/babylon.gui.js"></script> And, Yes I am using Babylonjs 3.0 (It's written on my console) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 20, 2017 Share Posted November 20, 2017 You actually need babylon.js 3.1 to work with the latest version of GUI Quote Link to comment Share on other sites More sharing options...
Xetar Posted November 21, 2017 Author Share Posted November 21, 2017 5 hours ago, Deltakosh said: You actually need babylon.js 3.1 to work with the latest version of GUI Thanks, that was the solution ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2017 Share Posted November 21, 2017 Perfect! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.