Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM Support #989

Open
lorisgir opened this issue Oct 29, 2024 · 2 comments
Open

WASM Support #989

lorisgir opened this issue Oct 29, 2024 · 2 comments

Comments

@lorisgir
Copy link

Describe the bug
I'm trying to run the unity player on flutter web with wasm enabled, but it gives me this error:
TargetPlatform.macOS is not yer supported by the unity player plugin.

I'm running this from my macbook pro. Is this an expected behaviour?

To Reproduce
Steps to reproduce the behavior:

  1. Run on flutter web with --wasm

Expected behavior
The player running.

Unity (please complete the following information):

  • OS: MacOS 14.6
  • Version Unity 2022.3.43f1

Smartphone (please complete the following information):

  • Device: Chrome
@lorisgir
Copy link
Author

lorisgir commented Nov 2, 2024

I tried to run the same code but switching to a windows pc and I got the same error:
TargetPlatform.windows is not yer supported by the unity player plugin.

@timbotimbo
Copy link
Collaborator

Looks like this conditional breaks as dart.library.html is not available with WASM.

export 'src/facade_widget.dart'
if (dart.library.io) 'src/io/unity_widget.dart'
if (dart.library.html) 'src/web/unity_widget.dart';

Dart:html is used plenty in web_unity_widget_controller.dart, so this plugin will need the dart:html to package:web migration to work on WASM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants