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

onAttached onDettached multiples UnityWidget #728

Open
Ortes opened this issue Dec 10, 2022 · 1 comment
Open

onAttached onDettached multiples UnityWidget #728

Ortes opened this issue Dec 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Ortes
Copy link
Contributor

Ortes commented Dec 10, 2022

When multiple unity widget are built un the tree only one is really displaying something, if my understanding is correct it is the last unity widget which executed the build method. In my case this is perfectly fine but I would like to know which unity widget is currently attached to the unity player.
In the end I would like to be able to initialize and dispose some Gameobject in Unity when a specific unity widget is used.

One ideal solution would be to have a onAttached and onDettached callbacks on UnityWidget.

I see a "events#onViewReattached" in FlutterUnityWidgetController called is this catchable somewhere ?

Have a nice WE

@Ortes
Copy link
Contributor Author

Ortes commented Dec 13, 2022

I tried a first implementation for this here #729

@timbotimbo timbotimbo added the enhancement New feature or request label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants