You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the addition of the hologram shader functionality the desktop project fails to import gltf assets and subsequently fails in execution during the loading of the avatar.
The importing error can be seen in the CI but doesn't happen locally when we run the desktop-project.
CI Stacktrace
In the CI the importing error is related to the shader used by the model, here's the full stacktrace
Asset import failed, "Packages/com.decentraland.unity-renderer/Rendering/LoadingAvatar/CrossSection/Avatar_Male_SingleMesh.glb" > ShaderNotFoundException: DCL/Universal Render Pipeline/Lit not found. Did you forget to add it to the build?
UnityGLTF.StandardMap..ctor (System.String shaderName, System.Int32 MaxLOD) (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/UniformMaps/StandardMap.cs:67)
UnityGLTF.MetalRough2StandardMap..ctor (System.String shaderName, System.Int32 MaxLOD) (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/UniformMaps/MetalRough2StandardMap.cs:8)
UnityGLTF.MetalRoughMap..ctor (System.Int32 MaxLOD) (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/UniformMaps/MetalRoughMap.cs:7)
UnityGLTF.GLTFSceneImporter+<ConstructMaterial>d__136.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:2068)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<DownloadAndConstructMaterial>d__130.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:1755)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<ConstructPrimitiveMaterials>d__128.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:1656)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<ConstructMesh>d__129.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:1716)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<ConstructScene>d__115.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:1317)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<CreateScene>d__99.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:613)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at Library/PackageCache/com.cysharp.unitask@9e2163616b/Runtime/UniTask.Factory.cs:211)
UnityGLTF.GLTFSceneImporter+<LoadScene>d__86.MoveNext () (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:366)
Rethrow as AggregateException: One or more errors occurred.
System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Threading.Tasks.Task.Wait (System.TimeSpan timeout) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityGLTF.GLTFImporter.CreateGLTFScene (System.String projectFilePath) (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/Editor/GLTFImporter.cs:136)
UnityGLTF.GLTFImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at /tmp/workspace/explorer-desktop/unity-renderer/unity-renderer/Assets/UnityGLTF/Scripts/Editor/GLTFImporter.cs:109)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at /home/bokken/buildslave/unity/build/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:22)
Tried fixes/workarounds
Different things have been tried to pinpoint the issue,
Thinking the issue was caused by the import from the unity package I've tried adding the avatar gltf model directly in the desktop project but it fails even in this case
I've tried re exporting the model both in glb and gltf with different options, with and without materials, without and without the import materials check in unity but it still fails
I've tried changing the shader of the material auto generated by unity when importing the model but the error still points to the Lit shader
I've verified and the shader is correctly included in the shader variants
I've tried duplicating the shader inside the explorer-desktop project but nothing changes
Something that was suggested might be that the glb is being imported before importing the shader, but from the logs it doesn't seem the case
Additional info
This issue is happening only in the exploer-desktop and not in the unity renderer project, but it happened to a few people that at first launch of the unity renderer project they were forced to use the Reimport all functionality to make the project work
The root cause were the materials, we fixed the Import Materials. Using the materials constructed by a GLTF in editor is a really edge case with no use case at the moment. Closing this.
Summary
Since the addition of the hologram shader functionality the desktop project fails to import gltf assets and subsequently fails in execution during the loading of the avatar.
The importing error can be seen in the CI but doesn't happen locally when we run the desktop-project.
CI Stacktrace
In the CI the importing error is related to the shader used by the model, here's the full stacktrace
Tried fixes/workarounds
Different things have been tried to pinpoint the issue,
Additional info
Reimport all
functionality to make the project workThe text was updated successfully, but these errors were encountered: