juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.13k stars 518 forks source link

Add support for web base not being on the root #865

Closed TonyHoyleRps closed 11 months ago

TonyHoyleRps commented 1 year ago

Currently the root path is hardcoded to Url.base.origin which is just the domain, and loses any subdirectory references.

This adds the path - it's slightly more fiddly than I'd like because Url.base.path is incosistent.. if there's a directory it ends with a slash, if there isn't it's completely empty rather than '/'.

timbotimbo commented 11 months ago

Just made builds with and without this fix. Can confirm that it now works in both the root and in a subfolder.