steven_EXC Posted March 6, 2017 Share Posted March 6, 2017 Hey guys! I'm checking out the most recent version of the Unity to BabylonJS exporter (freshly downloaded off GitHub!) and I'm having an error with compiling Typescript. I haven't added any Typescript to the Unity project so I think the only Typescript files that are attempting to be compiled are the three files inside the Babylon/Library folder. I also freshly updated my local Typescript compiler through npm just to make sure there were no issues there. The error I'm getting in Unity when I click "Build Script" is this: C:/nodejs/node_modules/typescript/lib/lib.d.ts(5603,11): error TS2320: Interface 'AudioContext' cannot simultaneously extend types 'AudioContextBase' and 'EventTarget'. Named property 'addEventListener' of types 'AudioContextBase' and 'EventTarget' are not identical. UnityEngine.Debug:LogError(Object) Unity3D2Babylon.Tools:BuildProjectTypeScript(String, String, String, String, String) (at Assets/Babylon/Source/Tools.cs:1550) Unity3D2Babylon.ExporterWindow:Build(Boolean, String[]) (at Assets/Babylon/Source/ExporterWindow.cs:647) Unity3D2Babylon.ExporterWindow:OnGUI() (at Assets/Babylon/Source/ExporterWindow.cs:565) UnityEditor.DockArea:OnGUI() I looked inside the babylon.d.ts file in the Babylon/Library folder and the AudioContext interface doesn't seem to try to extend from AudioContextBase (which given the names seems odd) so I'm assuming that I'm too much of a novice with Typescript to know what the actual problem is and how to fix it. Can anyone help me out? (I'm using Unity 5.5.0f3 but I can easily upgrade to a newer version if it will fix the issue.) I have a sinking feeling that I must have missed a readme file somewhere that I accidentally didn't read. Quote Link to comment Share on other sites More sharing options...
steven_EXC Posted March 6, 2017 Author Share Posted March 6, 2017 Found this related issue: https://github.com/Microsoft/TypeScript/issues/14261 I was able to stop the error by reverting to Typescript version 2.1.6. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 6, 2017 Share Posted March 6, 2017 I also fixed the issue in the latest version of the .d.ts here: https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview release/babylon.d.ts 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.