bghgary / glTF-Tools-for-Unity

MIT License
43 stars 10 forks source link

NotSupportedException occurred #12

Open AkiMatsushita opened 6 years ago

AkiMatsushita commented 6 years ago

Hi. I tried to export an Unity asset to glTF. then, below exception occurred.

NotSupportedException: Shader 'Unlit/BothsidesUnlit' is not supported PbrMaterialManager.ConvertToMetallic (UnityEngine.Material material) (at Assets/Gltf/PbrMaterialManager.cs:43) Gltf.Serialization.Exporter.ExportMaterialCore (UnityEngine.Material unityMaterial, Boolean packOcclusion, System.Int32& index) (at Assets/Gltf/Editor/Exporter.cs:370) Gltf.Serialization.Exporter.ExportMaterial (UnityEngine.Material unityMaterial) (at Assets/Gltf/Editor/Exporter.cs:357) Gltf.Serialization.Exporter.ExportNode (UnityEngine.GameObject gameObject) (at Assets/Gltf/Editor/Exporter.cs:317) Gltf.Serialization.Exporter+cAnonStoreyC.<>m1 (UnityEngine.GameObject child) (at Assets/Gltf/Editor/Exporter.cs:281) System.Linq.Enumerable+cIterator102[UnityEngine.GameObject,System.Int32].MoveNext () System.Collections.Generic.List1[System.Int32].AddEnumerable (IEnumerable1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128) System.Collections.Generic.List1[System.Int32]..ctor (IEnumerable1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65) System.Linq.Enumerable.ToArray[Int32] (IEnumerable1 source) Gltf.Serialization.Exporter.ExportNode (UnityEngine.GameObject gameObject) (at Assets/Gltf/Editor/Exporter.cs:281) Gltf.Serialization.Exporter.m2 (UnityEngine.GameObject inputObject) (at Assets/Gltf/Editor/Exporter.cs:149) System.Linq.Enumerable+cIterator102[UnityEngine.GameObject,System.Int32].MoveNext () System.Collections.Generic.List1[System.Int32].AddEnumerable (IEnumerable1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128) System.Collections.Generic.List1[System.Int32]..ctor (IEnumerable1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65) System.Linq.Enumerable.ToArray[Int32] (IEnumerable1 source) Gltf.Serialization.Exporter.Export (IEnumerable1 inputObjects, System.String outputDirectory, System.String outputName, Boolean outputBinary, ExportSettings settings) (at Assets/Gltf/Editor/Exporter.cs:149) Gltf.Serialization.GameObjectExtensions.Export (IEnumerable1 inputObjects, System.String outputDirectory, System.String outputName, Boolean outputBinary, ExportSettings settings) (at Assets/Gltf/Editor/Exporter.cs:59) Gltf.Serialization.GameObjectExtensions.Export (UnityEngine.GameObject inputObject, System.String outputDirectory, System.String outputName, Boolean outputBinary, ExportSettings settings) (at Assets/Gltf/Editor/Exporter.cs:52) Gltf.Serialization.ExportWindow+cAnonStorey0.<>m__0 (UnityEngine.GameObject gameObject) (at Assets/Gltf/Editor/ExportWindow.cs:91) EnumerableExtensions.ForEach[GameObject] (IEnumerable1 values, System.Action1 action) (at Assets/Gltf/EnumerableExtensions.cs:10) Gltf.Serialization.ExportWindow.OnGUI () (at Assets/Gltf/Editor/ExportWindow.cs:89) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288) UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:107) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:179)

glTF-Tools-for-Unity don't support this asset? I'd like to tell me how to solve this error.