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

[Unity 2019] 3d Model gets cropped out when resized in web #755

Closed
jawaharbabugit opened this issue Feb 2, 2023 · 1 comment · May be fixed by #759
Closed

[Unity 2019] 3d Model gets cropped out when resized in web #755

jawaharbabugit opened this issue Feb 2, 2023 · 1 comment · May be fixed by #759
Labels
WebGL This issue is specific to the Web platform

Comments

@jawaharbabugit
Copy link

Describe the bug
When I wrap the widget with a container or a sizedbox with a specific height and width, the 3d model is getting cropped instead of getting resized, as oppose to the android where it is getting resized properly.

To Reproduce
Steps to reproduce the behavior:

  1. Exported the Unity web files using [fuw-2022.1.7f1.unitypackage]
    2.Wrap the unitywidget in sizedbox of height and width 200.
    3.run in debug mode in chrome

Expected behavior
I expected the model to get resized properly instead of getting cropped.

Unity (please complete the following information):
Platform: Web(Chrome)
Version: flutter_unity_widget 2022.2.0
Unity Editor: 2019.4.39f1
Mode : Debug

@timbotimbo timbotimbo added the WebGL This issue is specific to the Web platform label Feb 2, 2023
@timbotimbo
Copy link
Collaborator

Looks alright to me using Unity 2022, 2021 or 2020.

Both your issues seem related to Unity 2019. Like answered here, the export breaks for Unity 2019 as the unityLibrary/index.html is different than expected.

I assume you are missing the canvas width and height being set to 100% here.
Looks like unity sets this fixed, which causes your issue.
<div id="unityContainer" style="width: 960px; height: 600px"></div>

I would suggest using a newer Unity version.

@timbotimbo timbotimbo changed the title 3d Model gets cropped out when resized in web [Unity 2019] 3d Model gets cropped out when resized in web Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGL This issue is specific to the Web platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants