Closed skelt closed 2 years ago
Thanks for reporting and sharing the fix!
I thought I fixed that bug in Piglet 1.3.3, but maybe not. Could you check which version of Piglet you are using? (One way to check is to look at the title string in Assets/Piglet/Documentation/index.md
.)
Hi :)
the version in that file is: Piglet glTF Importer 1.3.4
Ah, I see. In that case, I'm doubly grateful for the bug report!
I'll try to include a fix in the next Piglet release then (i.e. Piglet 1.3.6).
Would you be able to share your glTF file with me? That would allow me to try alternate ways of fixing it, and still be confident that I'm solving the problem.
You could send glTF file to me privately at awesomesaucelabs@gmail.com
, if you prefer. (Or if you'd rather not share it that's okay too, of course!)
@skelt:
Actually, never mind about the test file.
After looking at it a bit, I think I understand what's happening well enough that I don't need a test file.
This bug has been fixed in Piglet 1.3.6.
I did what @skelt suggested, except that I put the IsDataUri
check inside the ResolveUri
method, to ensure that the same problem does not occur in any other places where ResolveUri
is called.
Had to change around line 696 from:
foreach (var result in ResolveUri(uri)) { uri = result; yield return (YieldType.Continue, null, false); }
to
if (!UriUtil.IsDataUri(uri)) { foreach (var result in ResolveUri(uri)) { uri = result; yield return (YieldType.Continue, null, false); } }