Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Texture Custom Logic Error #422

Open
SpaceUserAR opened this issue Mar 11, 2024 · 0 comments
Open

Load Texture Custom Logic Error #422

SpaceUserAR opened this issue Mar 11, 2024 · 0 comments

Comments

@SpaceUserAR
Copy link

When trying to override the textures load with custom logic using the "OnResolveTexture" inside "MaterialImporter" scripts an exception is thrown and failed to load the textures.

ArgumentException: Empty path name is not legal. Parameter name: path System.IO.File.WriteAllBytes (System.String path, System.Byte[] bytes) (at <9d9536d9127f4a489d989c7a566aee1c>:0) Unity.Formats.USD.MaterialImporter.CombineRoughness (UnityEngine.Texture2D rgbTex, UnityEngine.Texture2D roughnessTex, System.String fileNameSuffix) (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Materials/MaterialImporter.cs:362) Unity.Formats.USD.UrpShaderImporter.ImportFromUsd () (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Materials/UrpShaderImporter.cs:81) Unity.Formats.USD.MaterialImporter.BuildMaterial (USD.NET.Scene scene, System.String materialPath, USD.NET.Unity.MaterialSample sample, Unity.Formats.USD.SceneImportOptions options) (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Materials/MaterialImporter.cs:183) Unity.Formats.USD.SceneImporter+<BuildScene>d__10.MoveNext () (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Scene/SceneImporter.cs:537) Rethrow as ImportException: Error processing material </World/rest/Looks/Accessories> UnityEngine.Debug:LogException(Exception) Unity.Formats.USD.<BuildScene>d__10:MoveNext() (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Scene/SceneImporter.cs:548) Unity.Formats.USD.SceneImporter:BuildScene(Scene, GameObject, SceneImportOptions, PrimMap, Boolean) (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Scene/SceneImporter.cs:371) Unity.Formats.USD.SceneImporter:ImportUsd(GameObject, Scene, PrimMap, Boolean, SceneImportOptions) (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Scene/SceneImporter.cs:318) Unity.Formats.USD.SceneImporter:ImportUsd(GameObject, Scene, PrimMap, SceneImportOptions) (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.5/Runtime/Scripts/IO/Scene/SceneImporter.cs:270)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant