Jump to content

Unity Exporter Typescript compilation


Recommended Posts

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.

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)

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...