Skip to content

onAttached onDettached multiples UnityWidget #728

Open
@Ortes

Description

@Ortes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions