Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Aug 26, 2023
1 parent c5b6f80 commit 43c814c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task Load()
GLTFSceneImporter sceneImporter = null;
try
{
Factory = Factory ?? ScriptableObject.CreateInstance<DefaultImporterFactory>();
if (!Factory) Factory = ScriptableObject.CreateInstance<DefaultImporterFactory>();

// UseStream is currently not supported...
string fullPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async Task<Texture2D> CheckMimeTypeAndLoadImage(GLTFImage image, Texture2D textu

ktxTexture.Dispose();
#else
Debug.Log(LogType.Warning, $"Can't import texture {image.Name} from {_gltfFileName} because it is a KTX2 file using the KHR_texture_basisu extension. Please add the package \"com.atteneder.ktx\" version v1.3+ to your project to import KTX2 textures.");
Debug.Log(LogType.Warning, $"Can't import texture \"{image.Name}\" from \"{_gltfFileName}\" because it is a KTX2 file using the KHR_texture_basisu extension. Please add the package \"com.atteneder.ktx\" version v1.3+ to your project to import KTX2 textures.");
await Task.CompletedTask;
texture = null;
#endif
Expand Down Expand Up @@ -286,7 +286,7 @@ protected virtual int GetTextureSourceId(GLTFTexture texture)
{
if (texture.Extensions != null && texture.Extensions.ContainsKey(KHR_texture_basisu.EXTENSION_NAME))
{
return (texture.Extensions[KHR_texture_basisu.EXTENSION_NAME] as KHR_texture_basisu).source.Id;
return ((KHR_texture_basisu)texture.Extensions[KHR_texture_basisu.EXTENSION_NAME]).source.Id;
}
return texture.Source?.Id ?? 0;
}
Expand Down

0 comments on commit 43c814c

Please sign in to comment.