UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Can't build for Android

Open smtabatabaie opened this issue 8 years ago • 3 comments

Hi, I can load and view a model from url in Unity editor. But as soon as I want to build for Android I get 35 errors on "something is defined multiple times" like : Assets/UnityGLTF/Scripts/UniformMaps/MetalRoughMap.cs(3,31): error CS0433: The imported type GLTF.Schema.AlphaMode' is defined multiple times Assets/UnityGLTF/Scripts/Cache/AnimationCacheData.cs(11,10): error CS0433: The imported typeGLTF.AttributeAccessor' is defined multiple times Assets/UnityGLTF/Scripts/Cache/TextureCacheData.cs(7,22): error CS0433: The imported type `GLTF.Schema.Texture' is defined multiple times

I'll appreciate if you can help with this.

smtabatabaie avatar Apr 16 '18 14:04 smtabatabaie

I can not build for Android too. But my error log is not the same as yours. My issue is about the file UnityGLTF.dll. ArgumentException: The Assembly UnityEditor is referenced by UnityGLTF ('Assets/Plugins/UnityGLTF.dll'). But the dll is not allowed to be included or could not be found.

I'll also appreciate if someone can help.

Liujunyu avatar Apr 17 '18 14:04 Liujunyu

Plz downlaod latest version of unitygltf and make sure it builds properly through visual studio and include shader retention scene in build setting,it will import all files required by unitygltf and to export as unity package,Open scripts folder there you will find export-unity-package.sh run it and unity package will be created and just import the package it will work perfectly fine and last thing include shader retention scene in build setting along with all of your existing scene.

aashishagrawall avatar Apr 24 '18 10:04 aashishagrawall

Same problem for me.. getting the same error I downloaded the latest version. serialization built successfully. Added the shader retention scene as well. running export-unity-package.sh gave this error: bash: /Applications/Unity/Unity.app/Contents/MacOS/Unity: No such file or directory im on a windows machine so didnt expect this to run either...

No idea what went wrong

taharaza16 avatar Jul 30 '18 06:07 taharaza16