sketchfab / unity-plugin

291 stars 39 forks source link

Sketchfab for Unity conflicts with new versions of UnityGLTF #3

Open Stephengower opened 5 years ago

Stephengower commented 5 years ago

Sketchfab for Unity depends upon a UnityGLTF.dll and a GLTFSerialization.dll

The problem is that these are older versions which means that it's not possible to load the newest release of UnityGLTF, because it depends upon a new verson of GLTFSerialization.dll. If you try to just use the new version of GLTFSerialization.dll, then the UnityGLTF.dll that comes with the Sketchfab for Unity breaks.

If this kind of dependency is going to exist, it would be good to update the Sketchfab for Unity asset to depend upon the newest version of UnityGLTF.

Stephengower commented 5 years ago

I now know, that the Sketchfab asset is built upon an older version of UnityGLTF, and so you're really not supposed to also use a separate version of UnityGLTF. But what I don't like is how you're using the UNityGLTF.dll. Instead it would be better to just include the normal UnityGLTF code, because a lot of this code is usable. For example: UnityGLTF contains a class GLTFComponent.cs that can be used to load/instantiate GlTF models at runtime. But you're hiding this in the .dll.

To get the sketchfab asset to work, and to load GlTF files at runtime, I needed to delete the UnityGlTF.dll and drop in place the version of UnityGlTF that this .dll is built with.

jeremedia commented 4 years ago

@Stephengower thanks for sharing your solution.

AurL commented 4 years ago

@Stephengower you are right. UnityGLTF and Sketchfab plugin cannot be used together at the moment, as the UnityGLTF deps is not managed correctly. Even without the lib, I would expect some conflicts anyway since both codes have diverged since a long time, and we didn't come back on it to clear the situation.

I opened a ticket to clean this situation and make it compatible with UnityGLTF but unfortunately I cannot share an ETA for this as the amount of work is not clear. We will be back here when it's done

Sorry for the very late feedback