BabylonJS / BabylonToolkit

Home of the community maintained Unity & Unreal exporters for Babylon.js
180 stars 47 forks source link

"XMLHttpRequestBodyInit" and "VRFrameData" errors #39

Closed punkoffice closed 3 years ago

punkoffice commented 3 years ago

I'm using Unity 2021.2.1f1 and Babylon Toolkit: V5.0.0-A48.3X9

I get this error message when trying to compile the script:

Assets/[Babylon]/Template/Typings/babylon.d.ts(566,32): error TS2304: Cannot find name 'XMLHttpRequestBodyInit'. Assets/[Babylon]/Template/Typings/babylon.d.ts(90425,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'VRFrameData' must be of type '{ new (): VRFrameData; prototype: VRFrameData; }', but here has type 'any'.

How do I get around this?

MackeyK24 commented 3 years ago

This is because the latest babylon js has updated to typescript 4.4.2

INstall at least that version

To install latest global: npm install -g typescript

I also now support local type script compilers per project... ion cause you cant or dont want to change your globally installed typescript version to stay compatable with older projects...

Anyways check the Script Compiler Section of the Toolkit Exporter Panel to install typescript to your local project... from the root of your toolkit project (with the package.json), run: npm install

Then Rebuild Project Editor to see changes in the Script Compiler Section

On Fri, Nov 5, 2021 at 9:03 PM Marcus Milne @.***> wrote:

I'm using Unity 2021.2.1f1 and Babylon Toolkit: V5.0.0-A48.3X9

I get this error message when trying to compile the script:

Assets/[Babylon]/Template/Typings/babylon.d.ts(566,32): error TS2304: Cannot find name 'XMLHttpRequestBodyInit'. Assets/[Babylon]/Template/Typings/babylon.d.ts(90425,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'VRFrameData' must be of type '{ new (): VRFrameData; prototype: VRFrameData; }', but here has type 'any'.

How do I get around this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BabylonJS/UnityExporter/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGH7JYBDQ6OWR3SYN3IGRTUKTHLJANCNFSM5HPJBDGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

punkoffice commented 3 years ago

Got it! It all works now, thanks mate