Closed ideletemyself closed 2 years ago
Seems like a TypeScript version issue.
We no longer use font.d.ts ... In the new typescript fonts are included.
I would get rid of font.d.ts in typings folder ... or better yet. get a clean [Babylon] folder...
I would try the updated babylon toolkit (last stable build) https://github.com/BabylonJS/UnityExporter/tree/master/Redist/Alpha
Yes. You were right I was running a super old version.
So that error is gone and I can compile but now I'm getting this new error about Lightmapping.lightingSettings here's the full error I get when I go to build:
Exception: Lightmapping.lightingSettings is null. Please assign it to an existing asset or a new instance.
UnityEditor.Lightmapping.get_lightingSettings () (at
I tried to just disable Export Lightmaps but that didn't seem to make any difference. This is just a new scene with a camera & directional light and a couple GameObjects, nothing crazy. Thanks again for your help.
For anyone who runs into my 2nd issue about the Lightmapping.lightingSettings error...
The fix is to go to Window > Rendering > Lighting and then to select or create and then select a lighting setting in "Lighting Settings" at the top of the window.
../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(4227,11):` error TS2430: Interface 'Document' incorrectly extends interface 'FontFaceSource'. The types of 'fonts.forEach' are incompatible between these types. Type '(callbackfn: (value: FontFace, value2: FontFace, set: Set) => void, thisArg?: any) => void' is not assignable to type '(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any) => void'.
Types of parameters 'callbackfn' and 'callbackfn' are incompatible.
Types of parameters 'parent' and 'set' are incompatible.
Type 'Set' is missing the following properties from type 'FontFaceSet': onloading, onloadingdone, onloadingerror, ready, and 6 more.
../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(5223,11): error TS2300: Duplicate identifier 'FontFace'.
../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(5241,13): error TS2300: Duplicate identifier 'FontFace'.
../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(5272,11): error TS2300: Duplicate identifier 'FontFaceSetLoadEvent'.
../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(5276,13): error TS2300: Duplicate identifier 'FontFaceSetLoadEvent'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(28991,81): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(38573,162): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(39014,54): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(39016,62): error TS2304: Cannot find name 'OffscreenCanvasRenderingContext2D'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(39107,67): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(40361,54): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(40363,62): error TS2304: Cannot find name 'OffscreenCanvasRenderingContext2D'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(41610,67): error TS2304: Cannot find name 'OffscreenCanvas'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84365,16): error TS2304: Cannot find name 'MSGesture'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84407,78): error TS2304: Cannot find name 'NavigatorUserMediaSuccessCallback'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84407,128): error TS2304: Cannot find name 'NavigatorUserMediaErrorCallback'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84408,75): error TS2304: Cannot find name 'NavigatorUserMediaSuccessCallback'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84408,125): error TS2304: Cannot find name 'NavigatorUserMediaErrorCallback'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84409,74): error TS2304: Cannot find name 'NavigatorUserMediaSuccessCallback'.
Assets/[Babylon]/Template/Typings/babylon.d.ts(84409,124): error TS2304: Cannot find name 'NavigatorUserMediaErrorCallback'.
Assets/[Babylon]/Template/Typings/fonts.d.ts(47,11): error TS2300: Duplicate identifier 'FontFace'.
Assets/[Babylon]/Template/Typings/fonts.d.ts(64,11): error TS2300: Duplicate identifier 'FontFaceSetLoadEvent'.
System.UnityTools:CompileProjectScriptBundle (System.IO.StreamWriter,string,string,string,string,bool,string) CanvasTools.CanvasToolsExporter:ExportProject (string,EditorSceneInformation,EditorBuildType,UnityEngine.Transform[],string,string) CanvasTools.CanvasToolsExporter:BuildProject (EditorBuildType,UnityEngine.Transform[],string,string) CanvasTools.CVPanel:OnGUI () UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Getting the following error when trying to Compile Script. It's a newly created Unity project and I just installed both NPM and Typescript from NPM. Not sure what I'm doing wrong?
I'm on Windows if that makes any difference..
Any help is appreciated. Thanks!