google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 603 forks source link

How to set multiple ArFragment #916

Open oguzhancevik opened 5 years ago

oguzhancevik commented 5 years ago

I want to duplicate ArFragment on a activity.

activity_cardboard.xml

` <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal">

    <fragment
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:id="@+id/cardboard_fragment_left"
        android:name="com.google.ar.sceneform.ux.ArFragment" />

    <fragment
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:id="@+id/cardboard_fragment_right"
        android:name="com.google.ar.sceneform.ux.ArFragment" />

</LinearLayout>`

But display only one ArFragment. Why?

Image of App

tpsiaki commented 5 years ago

Hi @oguzhancevik - Unfortunately we don't support two simultaneous ArFragments since they would each create a separate AR Session and a separate instance of Filament (our underlying rendering engine).

oguzhancevik commented 5 years ago

@tpsiaki thank you for answer. So why don't support (aspect technically)