gpvigano/AsImpL

Unexpected path normalization for ImportedModel callback after ImportModelAsync

NoTuxNoBux opened this issue · 1 comments

Environment

  • version of AsImpL: commit 698f024
  • version of Unity3D: 2019.4.13f

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.

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