gpvigano / AsImpL

Asynchronous Importer and run-time Loader for Unity
MIT License
212 stars 37 forks source link

Unexpected path normalization for ImportedModel callback after ImportModelAsync #44

Closed NoTuxNoBux closed 2 years ago

NoTuxNoBux commented 3 years ago

Environment

Steps to reproduce

  1. Register a callback for ImportedModel.
  2. Call ImportModelAsync with a path with backslashes, such as C:\My\Folder\model.obj.
  3. The imported path passed to the callback uses UNIX separators, i.e. C:/My/Folder/model.obj.

Expected behavior

The path is the original path that was passed to ImportModelAsync.

Current behavior

The path is normalized internally and then passed to the callback.

I can work around the issue by performing the same normalization in the caller, but it requires adding logic to my code that has intimate knowledge of the AsImpL internals, which could change at any time.

gpvigano commented 3 years ago

The last changes (04baa7bd9085c26b4e925af609cd42f190f5537c) should solve this issue. I think this solution should not cause side effects to other developers, anyway any further feedback is welcome.