UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Compiler issues in Unity 2020.3.25f1

Open 2-3-5-41 opened this issue 3 years ago • 7 comments

Errors from unity package.

When importing the unitypackage provided in the builds into Unity 2020.3.25f1 LTS, there are compiler errors complaining about multiple precompiled assemblies in the project, these are coming from the two Newtonsoft.json assemblies, one provided in the package, and one provided by unity by default in the package manager.

image

Post removal of extra Newtonsoft.json.dll

image


Errors from repo project file.

I've also downloaded the repo and tried opening the "UnityGLTF" project file with Unity 2020.3.25f1 LTS, and was prompted to load in safe mode, upon doing so, I'm presented with numerous compiler errors pertaining to cache, and extensions scripts. Up to 150 unique compiler errors.

image

2-3-5-41 avatar Feb 20 '22 07:02 2-3-5-41

Same problems in Unity 2020.3.27f1 (LTS)

JuniorBaltazar avatar Feb 23 '22 21:02 JuniorBaltazar

Same problems in 2020.3.30f1

FlintNT avatar Mar 11 '22 08:03 FlintNT

me too

rycsim avatar Mar 24 '22 15:03 rycsim

Hi, this should be fixed on the dev branch and in this PR:

  • https://github.com/KhronosGroup/UnityGLTF/pull/644

Would be great if you test that out, easy Unity package instructions are included in the link above.

hybridherbst avatar Apr 08 '22 11:04 hybridherbst

Uploading 1650442065(1).png…

The fix has been tested. During import, there're three errors. Below are details.

  1. Library\PackageCache\org.khronos.unitygltf@55b8a8bf4f\Editor\Scripts\GLTFImporter.cs(169,68): error CS0104: 'Animation' is an ambiguous reference between 'GLTF.Schema.Animation' and 'UnityEngine.Animation'

  2. Library\PackageCache\org.khronos.unitygltf@55b8a8bf4f\Editor\Scripts\GLTFImporter.cs(340,16): error CS1501: No overload for method 'ParseJson' takes 2 arguments

  3. Plugin 'Assets/Sketchfab For Unity/Dependencies/Libraries/GLTFSerialization.dll' has the same filename as Assembly Definition File 'Packages/org.khronos.unitygltf/Runtime/Plugins/GLTFSerialization/GLTFSerialization.asmdef'. Rename the assemblies to avoid hard to diagnose issues and crashes.

Would you please have a look? Thanks in advance.

Sparks-Lu avatar Apr 20 '22 08:04 Sparks-Lu

@Sparks-Lu Thanks, could you let me know which Unity version you're on?

Also, it looks like you have both "Sketchfab for Unity" and "UnityGltf" in the same project. Since the former was built on top of the latter, I don't think this is a usecase that can be reasonably supported, or rather that needs some fixes in "Sketchfab for Unity" - can look at that once the PR is merged.

hybridherbst avatar Apr 20 '22 12:04 hybridherbst

@Sparks-Lu Thanks, could you let me know which Unity version you're on?

My Unity version is 2020.3.25f1c1.

Also, it looks like you have both "Sketchfab for Unity" and "UnityGltf" in the same project. Since the former was built on top of the latter, I don't think this is a usecase that can be reasonably supported, or rather that needs some fixes in "Sketchfab for Unity" - can look at that once the PR is merged.

I see. Thanks.

Sparks-Lu avatar Apr 20 '22 12:04 Sparks-Lu

Hi, this should be fixed on the dev branch and in this PR:

Would be great if you test that out, easy Unity package instructions are included in the link above.

I installed this package, but the error is still. How do I solve it? My Unity version is 2021.3.9f1.

dayowoo avatar Nov 03 '22 06:11 dayowoo

@dayowoo you installed which package? Did you use the git package as instructed on the readme from the prefrontal cortex fork, or the currently outdated .unitypackage from this repo here?

hybridherbst avatar Nov 03 '22 13:11 hybridherbst