Getting Build failed due to compilation issues in scripts on WebGL platform

When I use Windows/Android platform with Cesium Unity SDK, Unity is able to successfully create builds but when I am building on WebGL platform, build is getting failed due to compilation issues in scripts.

Would like to know why there are compilation issues in script on WebGL platform?

Thanks

Complete build logs:-

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumBingMapsRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumCreditSystem.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(3,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGlobeAnchor.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumIonRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumMetadata.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTileMapServiceRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTransforms.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumWebMapServiceRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(2,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\NativeDownloadHandler.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGlobeAnchor.cs(78,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGlobeAnchor.cs(78,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumCreditSystem.cs(20,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumCreditSystem.cs(20,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumBingMapsRasterOverlay.cs(65,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumBingMapsRasterOverlay.cs(68,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(62,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(62,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(610,30): error CS8795: Partial method ‘Cesium3DTileset.Start()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(611,30): error CS8795: Partial method ‘Cesium3DTileset.Update()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(612,30): error CS8795: Partial method ‘Cesium3DTileset.OnValidate()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(614,30): error CS8795: Partial method ‘Cesium3DTileset.OnEnable()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(615,30): error CS8795: Partial method ‘Cesium3DTileset.OnDisable()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(621,29): error CS8795: Partial method ‘Cesium3DTileset.RecreateTileset()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\Cesium3DTileset.cs(626,29): error CS8795: Partial method ‘Cesium3DTileset.FocusTileset()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(263,30): error CS8795: Partial method ‘CesiumGeoreference.InitializeOrigin()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(269,30): error CS8795: Partial method ‘CesiumGeoreference.RecalculateOrigin()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(311,13): error CS8795: Partial method ‘CesiumGeoreference.TransformUnityPositionToEarthCenteredEarthFixed(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(322,13): error CS8795: Partial method ‘CesiumGeoreference.TransformEarthCenteredEarthFixedPositionToUnity(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(333,13): error CS8795: Partial method ‘CesiumGeoreference.TransformUnityDirectionToEarthCenteredEarthFixed(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGeoreference.cs(344,13): error CS8795: Partial method ‘CesiumGeoreference.TransformEarthCenteredEarthFixedDirectionToUnity(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumGlobeAnchor.cs(617,37): error CS8795: Partial method ‘CesiumGlobeAnchor.AdjustOrientation(CesiumGlobeAnchor, double3, double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumCreditSystem.cs(83,30): error CS8795: Partial method ‘CesiumCreditSystem.Update()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumMetadata.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumMetadata.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumMetadata.cs(12,31): error CS8795: Partial method ‘CesiumMetadata.loadMetadata(Transform, int, MetadataProperty)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumMetadata.cs(14,29): error CS8795: Partial method ‘CesiumMetadata.getNumberOfProperties(Transform)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumIonRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumIonRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumIonRasterOverlay.cs(44,41): error CS8795: Partial method ‘CesiumIonRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumIonRasterOverlay.cs(45,41): error CS8795: Partial method ‘CesiumIonRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTransforms.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTransforms.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTransforms.cs(20,13): error CS8795: Partial method ‘CesiumTransforms.LongitudeLatitudeHeightToEarthCenteredEarthFixed(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTransforms.cs(31,13): error CS8795: Partial method ‘CesiumTransforms.EarthCenteredEarthFixedToLongitudeLatitudeHeight(double3)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumWebMapServiceRasterOverlay.cs(10,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumWebMapServiceRasterOverlay.cs(10,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(30,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(30,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumWebMapServiceRasterOverlay.cs(122,41): error CS8795: Partial method ‘CesiumWebMapServiceRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumWebMapServiceRasterOverlay.cs(123,41): error CS8795: Partial method ‘CesiumWebMapServiceRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\NativeDownloadHandler.cs(7,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\NativeDownloadHandler.cs(7,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(37,31): error CS8795: Partial method ‘MetadataProperty.GetPropertyName()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(42,29): error CS8795: Partial method ‘MetadataProperty.IsNormalized()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(48,28): error CS8795: Partial method ‘MetadataProperty.GetComponentCount()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(50,31): error CS8795: Partial method ‘MetadataProperty.GetComponent(MetadataProperty, int)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(55,37): error CS8795: Partial method ‘MetadataProperty.GetComponentType()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(60,37): error CS8795: Partial method ‘MetadataProperty.GetMetadataType()’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(67,30): error CS8795: Partial method ‘MetadataProperty.GetInt8(sbyte)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(74,29): error CS8795: Partial method ‘MetadataProperty.GetUInt8(byte)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(81,30): error CS8795: Partial method ‘MetadataProperty.GetInt16(short)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(88,31): error CS8795: Partial method ‘MetadataProperty.GetUInt16(ushort)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(95,30): error CS8795: Partial method ‘MetadataProperty.GetInt32(int)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(102,31): error CS8795: Partial method ‘MetadataProperty.GetUInt32(uint)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(109,30): error CS8795: Partial method ‘MetadataProperty.GetInt64(long)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(116,31): error CS8795: Partial method ‘MetadataProperty.GetUInt64(ulong)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(123,30): error CS8795: Partial method ‘MetadataProperty.GetFloat32(float)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(130,31): error CS8795: Partial method ‘MetadataProperty.GetFloat64(double)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(137,32): error CS8795: Partial method ‘MetadataProperty.GetBoolean(bool)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\MetadataProperty.cs(144,31): error CS8795: Partial method ‘MetadataProperty.GetString(string)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\NativeDownloadHandler.cs(27,30): error CS8795: Partial method ‘NativeDownloadHandler.ReceiveDataNative(IntPtr, int)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTileMapServiceRasterOverlay.cs(10,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTileMapServiceRasterOverlay.cs(10,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTileMapServiceRasterOverlay.cs(86,41): error CS8795: Partial method ‘CesiumTileMapServiceRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Library\PackageCache\com.cesium.unity@0.1.1\Runtime\CesiumTileMapServiceRasterOverlay.cs(87,41): error CS8795: Partial method ‘CesiumTileMapServiceRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.

Error building Player because scripts had compiler errors

Build completed with a result of ‘Failed’ in 6 seconds (6226 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 83 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <63965ae56af7489797f355b7c1211ab2>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <63965ae56af7489797f355b7c1211ab2>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

same problem

Hi @gbhanuteja23,

Unfortunately, WebGL support is not available in Cesium for Unity. It may not even be (reasonably) possible because Cesium for Unity uses native code. If you need to use WebGL, we offer a pure WebGL rendering engine with CesiumJS that you can use for your 3D geospatial needs.

Need WebGL support :joy:

1 Like

+1 …

I have same problem on WIndows build, but I’m using Cesium from local package not from Package Manager

You should start a new thread, @Marek_Bakalarczuk, because it doesn’t sound like your problem has anything to do with WebGL. Please include details about how you’re building the plugin (if you are) and how you’re installing it.

1 Like

Yeah. It is different completely, but I manage it

Need WebGL support :joy:

Well, if you all want to band together and fund a large contract to add WebGL support to Cesium for Unity, we might be persuaded. :grinning: Otherwise, you’re probably going to have to use CesiumJS. Sorry.

I’m having same issue even though I’m using Linux platform.

Linux is also not an officially supported platform. But Linux (unlike WebGL) should work fine if you build Cesium for Unity yourself by following the Developer Setup Instructions (with small changes to adapt for Linux instead of Windows, of course).

Hi there, well then, an interactive react based d3, p5, cesium, unity engine visualizer of my firebase backend is not possible, I guess… sad.
Just spend the last two days getting unity with cesium running and wanted to deploy the two scenes just a minute ago… and gotta learn that the cesium unity plugin is not webgl compatible.

A dev’s journey.
Will get back to blender and load the OSM tiles over there.
Thanks anyways.

Have you taken a look at CesiumJS? It should be an excellent fit for what you described.